/* ================================
   BIZY - Premium Messaging App Styles
   Luxury Dark Theme
   ================================ */

:root {
    /* Color Palette - Luxury Dark */
    --color-bg-primary: #111827;
    --color-bg-secondary: #1F2933;
    --color-bg-tertiary: #2A2F38;
    --color-bg-hover: #323842;
    --color-bg-active: #3d424d;

    /* Accent Colors */
    --color-accent-gold: #D4AF37;
    --color-accent-gold-light: #F4D03F;
    --color-accent-blue: #3B82F6;
    --color-accent-emerald: #10B981;
    --color-accent-purple: #8B5CF6;
    --color-accent-rose: #F43F5E;

    /* Text Colors */
    --color-text-primary: #F9FAFB;
    --color-text-secondary: #D1D5DB;
    --color-text-tertiary: #9CA3AF;
    --color-text-muted: #6B7280;

    /* Status Colors */
    --color-online: #10B981;
    --color-away: #F59E0B;
    --color-offline: #6B7280;
    --color-danger: #EF4444;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-width-mobile: 260px;
}

/* ================================
   RESET & BASE STYLES
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================
   SCROLLBAR STYLING
   ================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-bg-hover);
}

/* ================================
   APP LAYOUT
   ================================ */

.app {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* ================================
   3D LUXURY AUTH SCREEN
   ================================ */

.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #1a2332 0%, #0f1419 50%, #000000 100%);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    perspective: 1500px;
}

/* 3D Animated Background */
.auth-3d-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Floating 3D Shapes */
.floating-shape {
    position: absolute;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(244, 208, 63, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    animation: float3D 20s ease-in-out infinite;
    pointer-events: none;
}

.shape-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
    transform: rotate3d(1, 1, 1, 45deg);
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: 3s;
    animation-duration: 30s;
    transform: rotate3d(1, 0, 1, 30deg);
}

.shape-3 {
    width: 120px;
    height: 120px;
    bottom: 15%;
    left: 20%;
    animation-delay: 5s;
    animation-duration: 22s;
    transform: rotate3d(0, 1, 1, 60deg);
}

.shape-4 {
    width: 180px;
    height: 180px;
    top: 30%;
    right: 25%;
    animation-delay: 2s;
    animation-duration: 28s;
    transform: rotate3d(1, 1, 0, 20deg);
}

.shape-5 {
    width: 100px;
    height: 100px;
    bottom: 25%;
    right: 10%;
    animation-delay: 7s;
    animation-duration: 24s;
    transform: rotate3d(1, 0, 0, 90deg);
}

@keyframes float3D {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate3d(1, 1, 1, 0deg);
    }
    25% {
        transform: translate3d(50px, -50px, 50px) rotate3d(1, 1, 1, 90deg);
    }
    50% {
        transform: translate3d(-30px, -80px, -30px) rotate3d(1, 1, 1, 180deg);
    }
    75% {
        transform: translate3d(-50px, 30px, 50px) rotate3d(1, 1, 1, 270deg);
    }
}

/* Gradient Orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: orbFloat 15s ease-in-out infinite;
    pointer-events: none;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4), transparent);
    top: -100px;
    left: -100px;
    animation-duration: 20s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent);
    bottom: -80px;
    right: -80px;
    animation-duration: 25s;
    animation-delay: 5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent);
    top: 50%;
    right: 10%;
    animation-duration: 18s;
    animation-delay: 3s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 50px) scale(0.9);
    }
}

/* 3D Card Wrapper with Tilt Effect */
.auth-card-wrapper {
    position: relative;
    z-index: 10;
    perspective: 1500px;
    animation: cardEntrance 1s ease-out;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(20deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: rgba(20, 28, 40, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 32px;
    padding: 48px 40px;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.8),
        0 0 80px rgba(212, 175, 55, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 32px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.4), rgba(59, 130, 246, 0.2), rgba(212, 175, 55, 0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    animation: borderRotate 4s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 3D Rotating Cube Logo */
.auth-logo-3d {
    perspective: 1000px;
    margin: 0 auto 32px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-cube {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 10s linear infinite;
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.cube-face {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: #111827;
    background: linear-gradient(135deg, #D4AF37, #F4D03F);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.cube-face.front  { transform: rotateY(0deg) translateZ(40px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(40px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(40px); background: linear-gradient(135deg, #C4A030, #D4AF37); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(40px); background: linear-gradient(135deg, #C4A030, #D4AF37); }
.cube-face.top    { transform: rotateX(90deg) translateZ(40px); background: linear-gradient(135deg, #F4D03F, #D4AF37); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(40px); background: linear-gradient(135deg, #B4902F, #C4A030); }

/* Animated Title Letters */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.title-letter {
    display: inline-block;
    background: linear-gradient(135deg, #D4AF37 0%, #F4D03F 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: letterFloat 3s ease-in-out infinite;
    animation-delay: var(--delay);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

@keyframes letterFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.auth-subtitle {
    font-size: 16px;
    color: #9CA3AF;
    font-weight: 400;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 10;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 10;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #D1D5DB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.label-icon {
    width: 18px;
    height: 18px;
    color: #D4AF37;
}

/* Input Container with 3D Effect */
.input-container {
    position: relative;
    transform-style: preserve-3d;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(15, 20, 30, 0.8);
    border: 2px solid rgba(75, 85, 99, 0.5);
    border-radius: 16px;
    color: #F9FAFB;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 10;
}

.form-input:focus {
    outline: none;
    border-color: #D4AF37;
    background: rgba(212, 175, 55, 0.05);
    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.1),
        0 8px 24px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #6B7280;
}

/* Input Glow Effect */
.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(59, 130, 246, 0.2));
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.form-input:focus ~ .input-glow {
    opacity: 1;
}

/* 3D Button */
.btn-3d {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4D03F 100%);
    border: none;
    border-radius: 16px;
    color: #111827;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 16px rgba(212, 175, 55, 0.4),
        0 4px 8px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    margin-top: 8px;
    z-index: 10;
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-3d:hover::before {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(255, 255, 255, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-3d:hover {
    transform: translateY(-4px);
    box-shadow:
        0 16px 32px rgba(212, 175, 55, 0.5),
        0 8px 16px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-3d:hover .btn-shine {
    opacity: 1;
}

.btn-3d:active {
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(212, 175, 55, 0.4),
        0 2px 6px rgba(212, 175, 55, 0.3);
}

/* Legacy button classes for compatibility */
.btn-signin {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4D03F 100%);
    border: none;
    border-radius: 16px;
    color: #111827;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 16px rgba(212, 175, 55, 0.4),
        0 4px 8px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    margin-top: 8px;
    z-index: 10;
}

.btn-signin:hover {
    transform: translateY(-4px);
    box-shadow:
        0 16px 32px rgba(212, 175, 55, 0.5),
        0 8px 16px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-signin:active {
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(212, 175, 55, 0.4),
        0 2px 6px rgba(212, 175, 55, 0.3);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    font-size: 15px;
    color: #D1D5DB;
    margin-top: 8px;
}

.auth-link {
    color: #D4AF37;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    position: relative;
    z-index: 10;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.auth-link:hover::after {
    width: 100%;
}

.auth-link:hover {
    color: #F4D03F;
    transform: scale(1.05);
}

.auth-link:active {
    transform: scale(0.98);
}

/* Demo Hint */
.auth-demo-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    font-size: 13px;
    color: #9CA3AF;
}

.auth-demo-hint svg {
    width: 16px;
    height: 16px;
    color: #D4AF37;
}

.auth-demo-hint strong {
    color: #D4AF37;
    font-weight: 600;
}

/* Mobile Touch Support */
* {
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
}

input, button, a {
    -webkit-user-select: text;
    user-select: text;
}

button, a {
    touch-action: manipulation;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-screen {
        perspective: 1000px;
    }

    .auth-card {
        padding: 36px 28px;
        max-width: 100%;
    }

    .auth-title {
        font-size: 42px;
    }

    .title-letter {
        font-size: 42px;
    }

    .logo-cube {
        width: 60px;
        height: 60px;
    }

    .cube-face {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }

    .cube-face.front  { transform: rotateY(0deg) translateZ(30px); }
    .cube-face.back   { transform: rotateY(180deg) translateZ(30px); }
    .cube-face.right  { transform: rotateY(90deg) translateZ(30px); }
    .cube-face.left   { transform: rotateY(-90deg) translateZ(30px); }
    .cube-face.top    { transform: rotateX(90deg) translateZ(30px); }
    .cube-face.bottom { transform: rotateX(-90deg) translateZ(30px); }

    .form-input {
        font-size: 16px;
        padding: 18px 20px;
    }

    .btn-3d {
        padding: 20px 32px;
        font-size: 18px;
        min-height: 56px;
    }

    .btn-signin {
        padding: 20px 32px;
        font-size: 18px;
        min-height: 56px;
    }

    .floating-shape {
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 24px;
    }

    .auth-title {
        font-size: 36px;
    }

    .form-input {
        padding: 16px 18px;
    }

    .btn-3d {
        padding: 18px 28px;
        min-height: 54px;
    }

    .btn-signin {
        padding: 18px 28px;
        min-height: 54px;
    }
}

   MAIN APP LAYOUT
   ================================ */

.main-app {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* ================================
   SIDEBAR
   ================================ */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--color-bg-secondary);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base);
    z-index: 1000;
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, var(--color-accent-gold-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-bg-primary);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, var(--color-accent-gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    position: relative;
}

.nav-item:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--color-bg-tertiary);
    color: var(--color-accent-gold);
    box-shadow: var(--shadow-sm);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--color-accent-gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nav-icon {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.nav-item-danger {
    color: var(--color-danger);
}

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

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: var(--space-lg);
    left: var(--space-lg);
    width: 44px;
    height: 44px;
    background: var(--color-bg-secondary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    cursor: pointer;
    z-index: 1001;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.sidebar-toggle svg {
    width: 24px;
    height: 24px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ================================
   MAIN CONTENT
   ================================ */

.main-content {
    flex: 1;
    height: 100vh;
    overflow: hidden;
    background: var(--color-bg-primary);
    display: flex;
    flex-direction: column;
}

/* ================================
   PAGE LAYOUT
   ================================ */

.page {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.page-header {
    padding: var(--space-lg);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.page-actions {
    display: flex;
    gap: var(--space-sm);
}

.page-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ================================
   BUTTONS & ACTIONS
   ================================ */

.btn {
    padding: 10px 20px;
    background: var(--color-bg-tertiary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn:hover {
    background: var(--color-bg-hover);
    transform: translateY(-1px);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, var(--color-accent-gold-light) 100%);
    color: var(--color-bg-primary);
}

.btn-accent:hover {
    box-shadow: var(--shadow-glow);
}

.fab {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, var(--color-accent-gold-light) 100%);
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-bg-primary);
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.fab svg {
    width: 28px;
    height: 28px;
}

/* ================================
   CHAT LIST
   ================================ */

.chat-list {
    display: flex;
    flex-direction: column;
}

.chat-search {
    padding: var(--space-md);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--color-bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-accent-gold);
    background: var(--color-bg-hover);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
}

.chat-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    position: relative;
}

.chat-item:hover {
    background: var(--color-bg-secondary);
}

.chat-item.active {
    background: var(--color-bg-tertiary);
}

.chat-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, var(--color-accent-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: var(--color-online);
    border: 3px solid var(--color-bg-primary);
    border-radius: var(--radius-full);
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-last-message {
    font-size: 13px;
    color: var(--color-text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.chat-time {
    font-size: 12px;
    color: var(--color-text-muted);
}

.unread-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--color-accent-gold);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-bg-primary);
}

.pin-icon {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
}

/* ================================
   CHAT CONVERSATION
   ================================ */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.back-btn {
    display: none;
    width: 36px;
    height: 36px;
    background: var(--color-bg-tertiary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.chat-header-info {
    flex: 1;
    min-width: 0;
}

.chat-header-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.chat-header-status {
    font-size: 13px;
    color: var(--color-text-tertiary);
}

.chat-header-actions {
    display: flex;
    gap: var(--space-sm);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.message-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.message-group.sent {
    align-items: flex-end;
}

.message-group.received {
    align-items: flex-start;
}

.message {
    max-width: 70%;
    position: relative;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
}

.message-group.sent .message-bubble {
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, var(--color-accent-gold-light) 100%);
    color: var(--color-bg-primary);
    border-bottom-right-radius: 4px;
}

.message-group.received .message-bubble {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border-bottom-left-radius: 4px;
}

.message-media {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-xs);
    cursor: pointer;
}

.message-media img,
.message-media video {
    width: 100%;
    max-width: 300px;
    display: block;
}

.message-time {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.message-group.sent .message-time {
    justify-content: flex-end;
}

.message-edited {
    font-style: italic;
    opacity: 0.7;
}

.message-reactions {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
    flex-wrap: wrap;
}

.reaction {
    padding: 4px 8px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.reaction:hover {
    transform: scale(1.1);
}

.message-reply-to {
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--color-accent-gold);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xs);
    font-size: 13px;
    opacity: 0.8;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-lg);
    width: fit-content;
    margin: var(--space-sm) 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--color-text-muted);
    border-radius: var(--radius-full);
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.scroll-to-bottom {
    position: absolute;
    bottom: 100px;
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    background: var(--color-accent-gold);
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-bg-primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.scroll-to-bottom:hover {
    transform: scale(1.1);
}

.scroll-to-bottom svg {
    width: 24px;
    height: 24px;
}

.chat-input-container {
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--color-bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    color: var(--color-text-primary);
    font-size: 15px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    transition: all var(--transition-fast);
}

.chat-input:focus {
    outline: none;
    border-color: var(--color-accent-gold);
    background: var(--color-bg-hover);
}

.input-actions {
    display: flex;
    gap: var(--space-xs);
}

.input-btn {
    width: 40px;
    height: 40px;
    background: var(--color-bg-tertiary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.input-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.input-btn.send-btn {
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, var(--color-accent-gold-light) 100%);
    color: var(--color-bg-primary);
}

.input-btn.send-btn:hover {
    transform: scale(1.05);
}

.input-btn svg {
    width: 20px;
    height: 20px;
}

/* ================================
   STATUS / STORIES
   ================================ */

.status-bar {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    overflow-x: auto;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-bar::-webkit-scrollbar {
    height: 4px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    flex-shrink: 0;
}

.status-avatar-wrapper {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-full);
    padding: 3px;
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, var(--color-accent-gold-light) 100%);
    position: relative;
}

.status-avatar-wrapper.viewed {
    background: var(--color-text-muted);
}

.status-avatar {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    border: 3px solid var(--color-bg-primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent-blue) 0%, var(--color-accent-purple) 100%);
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.status-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-status-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: var(--color-accent-gold);
    border: 3px solid var(--color-bg-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bg-primary);
    font-size: 16px;
    font-weight: 700;
}

.status-name {
    font-size: 13px;
    color: var(--color-text-secondary);
    max-width: 70px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.status-viewer-content {
    width: 100%;
    max-width: 500px;
    height: 100%;
    max-height: 900px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.status-viewer-header {
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
    z-index: 10;
}

.status-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 4px;
    padding: var(--space-sm) var(--space-lg);
}

.progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 100ms linear;
}

.status-viewer-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.status-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.status-content.text {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}

.status-content img,
.status-content video {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-lg);
}

.status-viewer-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 20;
}

/* ================================
   FRIENDS & GROUPS
   ================================ */

.user-list {
    display: flex;
    flex-direction: column;
}

.user-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition: background var(--transition-fast);
}

.user-item:hover {
    background: var(--color-bg-secondary);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.user-username {
    font-size: 13px;
    color: var(--color-text-tertiary);
}

.user-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* ================================
   PROFILE & SETTINGS
   ================================ */

.settings-section {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
}

.settings-item-info {
    flex: 1;
}

.settings-item-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.settings-item-description {
    font-size: 13px;
    color: var(--color-text-tertiary);
}

.toggle-switch {
    width: 48px;
    height: 26px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.toggle-switch.active {
    background: var(--color-accent-gold);
}

.toggle-switch-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: var(--radius-full);
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform var(--transition-fast);
}

.toggle-switch.active .toggle-switch-thumb {
    transform: translateX(22px);
}

.profile-header {
    padding: var(--space-xl);
    background: var(--color-bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.profile-avatar:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.profile-username {
    font-size: 15px;
    color: var(--color-text-tertiary);
}

/* ================================
   MODALS
   ================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-text-primary);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

/* ================================
   MEDIA VIEWER
   ================================ */

.media-viewer {
    background: rgba(0, 0, 0, 0.95);
}

.media-viewer-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.media-viewer-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: background var(--transition-fast);
}

.media-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.media-viewer-body {
    max-width: 90%;
    max-height: 90%;
}

.media-viewer-body img,
.media-viewer-body video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-lg);
}

/* ================================
   EMOJI PICKER
   ================================ */

.emoji-picker {
    position: fixed;
    bottom: 100px;
    right: var(--space-lg);
    width: 320px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.emoji-picker-content {
    padding: var(--space-md);
}

.emoji-categories {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
}

.emoji-category {
    padding: var(--space-sm);
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.emoji-category:hover {
    background: var(--color-bg-tertiary);
}

.emoji-category.active {
    background: var(--color-bg-tertiary);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--space-xs);
    max-height: 240px;
    overflow-y: auto;
}

.emoji-item {
    padding: var(--space-sm);
    font-size: 24px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item:hover {
    background: var(--color-bg-tertiary);
    transform: scale(1.2);
}

/* ================================
   TOAST NOTIFICATIONS
   ================================ */

.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    min-width: 300px;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

.toast-icon {
    width: 24px;
    height: 24px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--color-text-primary);
}

/* ================================
   EMPTY STATES
   ================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
    height: 100%;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-lg);
    color: var(--color-text-muted);
}

.empty-state-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.empty-state-description {
    font-size: 15px;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-lg);
    max-width: 400px;
}

/* ================================
   LOADING
   ================================ */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-bg-tertiary);
    border-top-color: var(--color-accent-gold);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        width: var(--sidebar-width-mobile);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay {
        display: block;
    }

    .back-btn {
        display: flex;
    }

    .message {
        max-width: 85%;
    }

    .page-header {
        padding: var(--space-md);
    }

    .page-title {
        font-size: 20px;
    }

    .chat-messages {
        padding: var(--space-md);
    }

    .chat-input-container {
        padding: var(--space-md);
    }

    .fab {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 56px;
        height: 56px;
    }

    .toast-container {
        top: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
    }

    .toast {
        min-width: 0;
    }

    .emoji-picker {
        bottom: 80px;
        right: var(--space-md);
        left: var(--space-md);
        width: auto;
    }

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

    .status-viewer-content {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: var(--space-lg);
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .auth-logo h1 {
        font-size: 28px;
    }

    .avatar {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .chat-name {
        font-size: 14px;
    }

    .chat-last-message {
        font-size: 12px;
    }

    .message-bubble {
        font-size: 14px;
        padding: 10px 14px;
    }
}

/* ================================
   UTILITY CLASSES
   ================================ */

.hidden {
    display: none !important;
}

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

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

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }

.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
