:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --primary-light: #8B7FFF;
    --secondary: #FF6B9D;
    --secondary-light: #FF8FB1;
    --success: #2ED573;
    --info: #45AAF2;
    --warning: #FFA502;
    --danger: #FF4757;
    --dark: #2C3E50;
    --gray: #7F8C8D;
    --light-gray: #ECF0F1;
    --bg: #F8F9FE;
    --white: #FFFFFF;
    --shadow: 0 2px 20px rgba(108, 99, 255, 0.1);
    --shadow-hover: 0 8px 30px rgba(108, 99, 255, 0.2);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(108,99,255,0.1);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 800;
    font-size: 1.4rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(108,99,255,0.3);
}

.brand-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover { color: var(--primary); background: rgba(108,99,255,0.08); }
.nav-link.active { color: var(--primary); background: rgba(108,99,255,0.12); font-weight: 600; }
.nav-emergency { color: var(--danger); }
.nav-emergency:hover { background: rgba(255,71,87,0.1); color: var(--danger); }
.nav-emergency.active { background: rgba(255,71,87,0.15); color: var(--danger); }
.nav-logout:hover { background: rgba(255,71,87,0.1); color: var(--danger); }
.nav-divider {
    width: 1px;
    height: 30px;
    background: var(--light-gray);
    margin: 0 8px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    min-height: calc(100vh - 70px);
}

.main-content.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.main-content.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

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

/* ===== FOOTER ===== */
.footer {
    background: var(--white);
    border-top: 1px solid rgba(108,99,255,0.1);
    padding: 16px 24px;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray);
}

.footer-links { display: flex; gap: 20px; }
.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--primary); }

/* ===== AUTH PAGES ===== */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.auth-card {
    background: rgba(255,255,255,0.97);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    backdrop-filter: blur(20px);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 25px rgba(108,99,255,0.3);
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.auth-header p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.input-group {
    position: relative;
}

.input-group .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1rem;
    z-index: 2;
}

.form-control {
    width: 100%;
    padding: 13px 16px 13px 44px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg);
    transition: var(--transition);
    color: var(--dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108,99,255,0.1);
    background: var(--white);
}

.form-control::placeholder { color: #B0B0B0; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(108,99,255,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,99,255,0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover { background: rgba(108,99,255,0.08); }

.btn-success {
    background: linear-gradient(135deg, var(--success), #26b863);
    color: white;
    box-shadow: 0 4px 15px rgba(46,213,115,0.3);
}

.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(46,213,115,0.4); }

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e84142);
    color: white;
    box-shadow: 0 4px 15px rgba(255,71,87,0.3);
}

.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,71,87,0.4); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== ALERTS ===== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-danger { background: rgba(255,71,87,0.1); color: var(--danger); border: 1px solid rgba(255,71,87,0.2); }
.alert-success { background: rgba(46,213,115,0.1); color: #219a52; border: 1px solid rgba(46,213,115,0.2); }
.alert-warning { background: rgba(255,165,2,0.1); color: #cc8400; border: 1px solid rgba(255,165,2,0.2); }
.alert-info { background: rgba(69,170,242,0.1); color: #2d8fcf; border: 1px solid rgba(69,170,242,0.2); }

/* ===== DASHBOARD ===== */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

.welcome-section {
    background: linear-gradient(135deg, var(--primary), #8B7FFF, var(--secondary));
    border-radius: 24px;
    padding: 40px 48px;
    color: white;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    transform: translate(100px, -100px);
}

.welcome-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    transform: translate(-50px, 50px);
}

.welcome-content { position: relative; z-index: 1; }
.welcome-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.welcome-content p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 20px; }

.welcome-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.welcome-actions .btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 12px 24px;
}
.welcome-actions .btn:hover { background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.5); transform: translateY(-2px); }
.welcome-actions .btn-primary {
    background: white; color: var(--primary); border-color: white;
}
.welcome-actions .btn-primary:hover { background: rgba(255,255,255,0.9); color: var(--primary-dark); }

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(108,99,255,0.06);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.stat-icon.purple { background: rgba(108,99,255,0.12); color: var(--primary); }
.stat-icon.pink { background: rgba(255,107,157,0.12); color: var(--secondary); }
.stat-icon.green { background: rgba(46,213,115,0.12); color: var(--success); }
.stat-icon.orange { background: rgba(255,165,2,0.12); color: var(--warning); }
.stat-icon.blue { background: rgba(69,170,242,0.12); color: var(--info); }
.stat-icon.red { background: rgba(255,71,87,0.12); color: var(--danger); }

.stat-card h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; color: var(--dark); }
.stat-card p { color: var(--gray); font-size: 0.9rem; font-weight: 500; }

/* ===== SECTION TITLES ===== */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
}

.section-title a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== CARDS GRID ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(108,99,255,0.06);
    text-decoration: none;
    color: var(--dark);
    display: block;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: var(--dark);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 16px;
}

.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--gray); font-size: 0.9rem; line-height: 1.5; }

/* ===== CHAT INTERFACE ===== */
.chat-page { padding: 0; display: flex; height: calc(100vh - 70px); }
.chat-container { display: flex; width: 100%; max-width: 1400px; margin: 0 auto; height: 100%; }
.chat-sidebar {
    width: 320px;
    background: var(--white);
    border-right: 1px solid rgba(108,99,255,0.1);
    padding: 24px;
    overflow-y: auto;
    flex-shrink: 0;
}

.chat-sidebar h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
}

.quick-topics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.topic-btn {
    padding: 12px 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-btn:hover { border-color: var(--primary); background: rgba(108,99,255,0.05); color: var(--primary); }
.topic-btn i { font-size: 1.1rem; color: var(--primary); }

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px 24px;
    background: var(--white);
    border-bottom: 1px solid rgba(108,99,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.chat-header-info h4 { font-size: 1rem; font-weight: 700; }
.chat-header-info p { font-size: 0.8rem; color: var(--success); }
.chat-header-info p i { font-size: 0.6rem; }

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg);
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: messageSlide 0.3s ease;
}

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

.message.bot { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }

.message-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.message.bot .message-avatar { background: rgba(108,99,255,0.12); color: var(--primary); }
.message.user .message-avatar { background: rgba(255,107,157,0.12); color: var(--secondary); }

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.message.bot .message-content {
    background: var(--white);
    border: 1px solid rgba(108,99,255,0.1);
    border-top-left-radius: 4px;
    color: var(--dark);
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-top-right-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 4px;
}

.chat-input-area {
    padding: 20px 24px;
    background: var(--white);
    border-top: 1px solid rgba(108,99,255,0.1);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input-wrapper textarea {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--light-gray);
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    min-height: 52px;
    max-height: 120px;
    transition: var(--transition);
    background: var(--bg);
}

.chat-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108,99,255,0.1);
}

.chat-send-btn {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-send-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(108,99,255,0.4); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* ===== REMINDERS ===== */
.reminder-page { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }

.reminder-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
    border: 1px solid rgba(108,99,255,0.06);
}

.reminder-card:hover { transform: translateX(4px); box-shadow: var(--shadow-hover); }

.reminder-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.reminder-info { flex: 1; }
.reminder-info h4 { font-size: 1rem; font-weight: 600; margin-bottom: 2px; }
.reminder-info p { font-size: 0.85rem; color: var(--gray); }
.reminder-time { font-weight: 600; color: var(--primary); white-space: nowrap; }

.reminder-actions { display: flex; gap: 8px; }

/* ===== EMERGENCY ===== */
.emergency-page { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }

.emergency-banner {
    background: linear-gradient(135deg, var(--danger), #e84142);
    border-radius: 24px;
    padding: 32px;
    color: white;
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.emergency-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,255,255,0.05) 20px, rgba(255,255,255,0.05) 40px);
}

.emergency-banner * { position: relative; z-index: 1; }
.emergency-banner i { font-size: 3rem; margin-bottom: 16px; }
.emergency-banner h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.emergency-banner p { font-size: 1.1rem; opacity: 0.9; }

.emergency-contact-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
    border-left: 4px solid var(--danger);
}

.emergency-contact-card:hover { transform: translateX(4px); box-shadow: var(--shadow-hover); }

.emergency-contact-card .contact-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(255,71,87,0.12);
    color: var(--danger);
    flex-shrink: 0;
}

.emergency-contact-card .contact-info { flex: 1; }
.emergency-contact-card .contact-info h4 { font-size: 1rem; font-weight: 600; }
.emergency-contact-card .contact-info p { font-size: 0.85rem; color: var(--gray); }
.emergency-contact-card .contact-phone { font-size: 1.2rem; font-weight: 700; color: var(--danger); white-space: nowrap; }

/* ===== TRACKING ===== */
.tracking-page { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }

.tracking-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.tracking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.tracking-input-group {
    text-align: center;
    padding: 16px;
    border: 2px dashed var(--light-gray);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.tracking-input-group:hover { border-color: var(--primary); background: rgba(108,99,255,0.03); }

.tracking-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 8px;
}

.tracking-input-group .track-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.tracking-input-group input {
    width: 100%;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    font-family: inherit;
}

.tracking-input-group input:focus { outline: none; }
.tracking-input-group .unit { font-size: 0.85rem; color: var(--gray); margin-top: 4px; }

/* ===== PROFILE ===== */
.profile-page { max-width: 800px; margin: 0 auto; padding: 32px 24px; }

.profile-header {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2.2rem;
    color: white;
}

.profile-header h2 { font-size: 1.5rem; font-weight: 700; }
.profile-header p { color: var(--gray); }

.profile-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 32px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.profile-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--light-gray);
}

.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(108,99,255,0.05);
}

.profile-field:last-child { border-bottom: none; }
.profile-field label { color: var(--gray); font-weight: 500; font-size: 0.9rem; }
.profile-field span { font-weight: 600; }

/* ===== ADMIN ===== */
.admin-page { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.admin-stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}
.admin-stat-card h3 { font-size: 2rem; font-weight: 800; color: var(--primary); }
.admin-stat-card p { color: var(--gray); font-size: 0.9rem; }

/* ===== TABLE ===== */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-container .table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-container .table-header h3 { font-size: 1.1rem; font-weight: 700; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 14px 24px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg);
    border-bottom: 1px solid var(--light-gray);
}

.data-table td {
    padding: 14px 24px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(108,99,255,0.05);
}

.data-table tr:hover td { background: rgba(108,99,255,0.02); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== MODAL ===== */
.modal-content {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-header { padding: 20px 24px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--light-gray); }

/* ===== LANGUAGE SWITCHER ===== */
.lang-switch {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-btn {
    padding: 4px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.lang-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.lang-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .chat-sidebar { display: none; }
    .message { max-width: 90%; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.1);
        border-radius: 0 0 var(--radius) var(--radius);
    }
    .nav-links.show { display: flex; }
    .nav-divider { display: none; }
    .welcome-section { padding: 24px; }
    .welcome-content h1 { font-size: 1.4rem; }
    .auth-card { padding: 32px 24px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-grid { grid-template-columns: 1fr; }
    .tracking-grid { grid-template-columns: repeat(2, 1fr); }
    .reminder-card { flex-direction: column; text-align: center; }
    .reminder-actions { width: 100%; justify-content: center; }
    .emergency-contact-card { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .tracking-grid { grid-template-columns: 1fr; }
    .welcome-actions { flex-direction: column; }
    .welcome-actions .btn { width: 100%; }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary { background: rgba(108,99,255,0.12); color: var(--primary); }
.badge-success { background: rgba(46,213,115,0.12); color: var(--success); }
.badge-danger { background: rgba(255,71,87,0.12); color: var(--danger); }
.badge-warning { background: rgba(255,165,2,0.12); color: var(--warning); }
.badge-info { background: rgba(69,170,242,0.12); color: var(--info); }
