/* ============================================
   Sweet Task - Global Styles
   Consistent Typography & Theme System
   ============================================ */

/* ============================================
   IMPORT CENTRALIZED THEME TOKENS
   ============================================ */
@import 'theme.css';

/* =========================================================
   UNIVERSAL REUSABLE FEATURE ICON & COLOR CLASSES
   Usable anywhere: .icon-*, .ico-*, .stat-icon.*, .qa-ico.*
   ========================================================= */

/* 1. Dashboard */
.icon-dashboard, .icon-home, .ico-dashboard, .stat-icon.dashboard, .qa-ico.dashboard {
    background: var(--theme-dashboard-bg) !important;
    border: 1px solid var(--theme-dashboard-border) !important;
    color: var(--theme-dashboard-color) !important;
    box-shadow: var(--theme-dashboard-glow);
}

/* 2. Tasks & Jobs */
.icon-tasks, .ico-tasks, .stat-icon.tasks, .qa-ico.tasks {
    background: var(--theme-tasks-bg) !important;
    border: 1px solid var(--theme-tasks-border) !important;
    color: var(--theme-tasks-color) !important;
    box-shadow: var(--theme-tasks-glow);
}

/* 3. Referral Network */
.icon-referral, .icon-users, .ico-referral, .stat-icon.referral, .qa-ico.referral {
    background: var(--theme-referral-bg) !important;
    border: 1px solid var(--theme-referral-border) !important;
    color: var(--theme-referral-color) !important;
    box-shadow: var(--theme-referral-glow);
}

/* 4. Wallet & Payouts */
.icon-wallet, .ico-wallet, .stat-icon.wallet, .qa-ico.wallet {
    background: var(--theme-wallet-bg) !important;
    border: 1px solid var(--theme-wallet-border) !important;
    color: var(--theme-wallet-color) !important;
    box-shadow: var(--theme-wallet-glow);
}

/* 5. Profile & Security */
.icon-profile, .icon-user, .ico-profile, .stat-icon.profile, .qa-ico.profile {
    background: var(--theme-profile-bg) !important;
    border: 1px solid var(--theme-profile-border) !important;
    color: var(--theme-profile-color) !important;
    box-shadow: var(--theme-profile-glow);
}

/* 6. VIP Membership */
.icon-vip, .icon-crown, .ico-vip, .stat-icon.vip, .qa-ico.vip {
    background: var(--theme-vip-bg) !important;
    border: 1px solid var(--theme-vip-border) !important;
    color: var(--theme-vip-color) !important;
    box-shadow: var(--theme-vip-glow);
}

/* 7. Achievements & Badges */
.icon-achieve, .icon-trophy, .ico-achieve, .stat-icon.achieve, .qa-ico.achieve {
    background: var(--theme-achieve-bg) !important;
    border: 1px solid var(--theme-achieve-border) !important;
    color: var(--theme-achieve-color) !important;
    box-shadow: var(--theme-achieve-glow);
}

/* 8. Help / FAQs */
.icon-help, .ico-help, .item-help i, .sidebar-grid-item.item-help i, .user-grid-item.item-help i {
    color: var(--theme-help-color) !important;
}
.icon-help, .ico-help {
    background: var(--theme-help-bg) !important;
    border: 1px solid var(--theme-help-border) !important;
    box-shadow: var(--theme-help-glow);
}

/* 9. Contact Us */
.icon-contact, .ico-contact, .item-contact i, .sidebar-grid-item.item-contact i, .user-grid-item.item-contact i {
    color: var(--theme-contact-color) !important;
}
.icon-contact, .ico-contact {
    background: var(--theme-contact-bg) !important;
    border: 1px solid var(--theme-contact-border) !important;
    box-shadow: var(--theme-contact-glow);
}

/* 10. Appeals */
.icon-appeal, .ico-appeal, .item-appeal i, .sidebar-grid-item.item-appeal i, .user-grid-item.item-appeal i {
    color: var(--theme-appeal-color) !important;
}
.icon-appeal, .ico-appeal {
    background: var(--theme-appeal-bg) !important;
    border: 1px solid var(--theme-appeal-border) !important;
    box-shadow: var(--theme-appeal-glow);
}

/* 11. About Us */
.icon-about, .ico-about, .item-about i, .sidebar-grid-item.item-about i, .user-grid-item.item-about i {
    color: var(--theme-about-color) !important;
}
.icon-about, .ico-about {
    background: var(--theme-about-bg) !important;
    border: 1px solid var(--theme-about-border) !important;
    box-shadow: var(--theme-about-glow);
}

/* 12. Logout Action */
.icon-logout, .ico-logout, .item-logout i, .sidebar-logout-btn.item-logout i, .user-menu-logout-btn.item-logout i {
    color: var(--theme-logout-color) !important;
}
.icon-logout, .ico-logout {
    background: var(--theme-logout-bg) !important;
    border: 1px solid var(--theme-logout-border) !important;
    box-shadow: var(--theme-logout-glow);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   TYPOGRAPHY - CONSISTENT SYSTEM
   ============================================ */
h1,
.h1 {
    font-size: var(--font-size-h1);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
}

h2,
.h2 {
    font-size: var(--font-size-h2);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h3,
.h3 {
    font-size: var(--font-size-h3);
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

h4,
.h4 {
    font-size: var(--font-size-h4);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

p {
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--text-secondary);
}

small,
.small {
    font-size: var(--font-size-small);
    color: var(--text-secondary);
}

.tiny {
    font-size: var(--font-size-tiny);
    color: var(--text-muted);
}

/* Responsive typography handled in 6-breakpoint architecture below */

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    min-height: calc(100vh - 80px);
    padding-top: 7.25rem;
    padding-bottom: 2.5rem;
}

/* ============================================
   BUTTON SYSTEM - CONSISTENT STYLES
   ============================================ */
.btn {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-body);
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-purple);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-small);
}

.btn i {
    font-size: var(--icon-size-sm);
}

/* Responsive buttons handled in 6-breakpoint architecture below */

/* ============================================
   CARD SYSTEM - CONSISTENT STYLES
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease-smooth);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: var(--font-size-h3);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.card-title i {
    font-size: var(--icon-size-md);
    color: var(--primary-purple);
}

.card-body {
    color: var(--text-secondary);
}

/* Responsive cards handled in 6-breakpoint architecture below */

/* ============================================
   FORM SYSTEM - CONSISTENT STYLES
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--font-size-body);
    font-weight: 500;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    display: block;
    font-size: var(--font-size-tiny);
    color: var(--text-muted);
    margin-top: 0.375rem;
}

/* Responsive forms handled in 6-breakpoint architecture below */

/* ============================================
   MODAL SYSTEM - CONSISTENT STYLES
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s var(--ease-bounce);
    box-shadow: var(--shadow-xl);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.modal-header h3 {
    font-size: var(--font-size-h3);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    font-size: var(--icon-size-md);
    color: var(--primary-purple);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    background: var(--bg-secondary);
}

/* Responsive modals handled in 6-breakpoint architecture below */

/* ============================================
   ICON SYSTEM - CONSISTENT SIZES
   ============================================ */
.icon-xl {
    font-size: var(--icon-size-xl);
}

.icon-lg {
    font-size: var(--icon-size-lg);
}

.icon-md {
    font-size: var(--icon-size-md);
}

.icon-sm {
    font-size: var(--icon-size-sm);
}

.icon-xs {
    font-size: var(--icon-size-xs);
}

/* ============================================
   NOTIFICATION SYSTEM
   ============================================ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s var(--ease-smooth);
}

.notification.success {
    border-left: 4px solid var(--color-success);
}

.notification.error {
    border-left: 4px solid var(--color-danger);
}

.notification.warning {
    border-left: 4px solid var(--color-warning);
}

.notification.info {
    border-left: 4px solid var(--color-info);
}

.notification i {
    font-size: var(--icon-size-md);
}

.notification.success i {
    color: var(--color-success);
}

.notification.error i {
    color: var(--color-danger);
}

.notification.warning i {
    color: var(--color-warning);
}

.notification.info i {
    color: var(--color-info);
}

.notification-message {
    flex: 1;
    font-size: var(--font-size-small);
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive notifications handled in 6-breakpoint architecture below */

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

/* ============================================
   STATUS BADGES - CONSISTENT STYLES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-tiny);
    font-weight: 600;
    border-radius: 20px;
}

.badge i {
    font-size: var(--icon-size-xs);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-info);
}

.badge-primary {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-purple);
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ============================================
   SCROLLBAR STYLING - HIDDEN
   ============================================ */
/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
* {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   6-BREAKPOINT RESPONSIVE ARCHITECTURE (DESKTOP-DOWN / DESKTOP-FIRST)
   ========================================================================== */

/* ─── 1. Base : Desktop (1280px–1600px+) ─── */
/* Note: Base Desktop styles and :root variables are defined above as default. */
@media (min-width: 1280px) {
    /* Any specific desktop-only enhancements */
}

/* ─── 2. Laptop (1024px–1279px) ─── */
@media (max-width: 1279px) {
    .container {
        max-width: var(--container-max-width);
        padding: 0 var(--container-padding-h);
    }
}

/* ─── 3. Tablet (768px–1023px) ─── */
@media (max-width: 1023px) {
    .container {
        max-width: var(--container-max-width);
        padding: 0 var(--container-padding-h);
    }

    .main-content {
        padding-top: 7.0rem;
        padding-bottom: 2rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
    }

    .btn-sm {
        padding: 0.5rem 0.875rem;
    }

    .card {
        padding: var(--card-padding);
        border-radius: 14px;
    }

    .card-header {
        margin-bottom: 1.25rem;
    }

    .modal-content {
        max-width: 500px;
        width: 90%;
    }
}

/* ─── 4. Large Mobile (640px–767px) ─── */
@media (max-width: 767px) {
    .container {
        padding: 0 var(--container-padding-h);
    }

    .modal-content {
        max-width: 420px;
        width: 95%;
    }

    .modal-header {
        padding: 1rem 1.25rem;
    }

    .modal-header h3 {
        font-size: var(--font-size-h4);
    }

    .modal-body {
        padding: 1.25rem;
    }

    .modal-footer {
        padding: 0.875rem 1.25rem;
        gap: 0.625rem;
    }
}

/* ─── 5. Mobile (480px–639px) ─── */
@media (max-width: 639px) {
    .container {
        padding: 0 var(--container-padding-h);
    }

    .main-content {
        padding-top: 7.0rem;
        padding-bottom: 1.5rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: var(--font-size-small);
    }

    .btn-sm {
        padding: 0.5rem 0.75rem;
    }

    .card {
        padding: var(--card-padding);
        border-radius: 12px;
    }

    .card-header {
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        padding: 0.625rem 0.875rem;
    }

    .modal-content {
        max-width: 360px;
    }

    .modal-header {
        padding: 0.875rem 1rem;
    }

    .modal-close {
        width: 28px;
        height: 28px;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* ─── 6. Tiny Mobile (300px–479px) ─── */
@media (max-width: 479px) {
    .container {
        padding: 0 var(--container-padding-h);
    }

    .card {
        padding: var(--card-padding);
        border-radius: 10px;
    }

    .btn {
        padding: 0.5rem 0.875rem;
        font-size: var(--btn-font-size);
        border-radius: 8px;
    }

    .modal-content {
        max-width: 95%;
        border-radius: 12px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.75rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {

    .header,
    .footer,
    .btn,
    .modal {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
    }
}