/* 
 * MAKIEREVO - Mobile App Styles
 * Version: 2.4 (Comprehensive Glassmorphism Layout)
 * ---------------------------------------------------------
 */

:root {
    /* Color Palette */
    --primary-accent: #6366f1;
    --secondary-accent: #a855f7;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Text */
    --text-main: #f8fafc;
    --text-dim: #94a3b8;

    /* Shared Effects */
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.3);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-top: env(safe-area-inset-top, 0px);
}

/* 1. Reset & Global Styles */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 2. Background Elements */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/assets/img/login_bg.png');
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.bg-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.98) 100%);
}

.blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -100px;
    right: -100px;
}

.blob-2 {
    bottom: 100px;
    left: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, 40px) scale(1.1);
    }
}

/* 3. Common Components */
.btn-action {
    width: 100%;
    padding: 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border: none;
    color: white !important;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-action:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.btn-action.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    box-shadow: none;
    color: white !important;
}

.btn-action.outline {
    background: transparent;
    border: 1px solid var(--primary-accent);
    color: var(--primary-accent) !important;
    box-shadow: none;
}

.btn-action i {
    font-size: 1.1rem;
}

.btn-action:disabled {
    opacity: 0.6;
    pointer-events: none;
}

.header {
    padding: calc(1rem + var(--safe-area-top)) 1.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.back-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.plan-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.plan-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
}

.plan-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.plan-meta .meta-item i {
    width: 14px;
    color: var(--primary-accent);
}

.btn-view {
    color: var(--secondary-accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-content {
    padding: 1rem 1.25rem calc(100px + var(--safe-area-bottom));
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.glass-card,
.detail-card,
.plan-card,
.task-card,
.menu-item,
.login-card,
.plan-info-card,
.status-card-compact,
.doc-card,
.current-status-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: var(--shadow-premium);
    text-decoration: none;
    color: inherit;
    display: block;
}

.plans-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 2rem;
}

.empty-state,
.loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    text-align: center;
    color: var(--text-dim);
}

.empty-state i,
.loading i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
}

.empty-state h5 {
    font-size: 1.25rem;
    color: white;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 250px;
    margin: 0 auto;
    line-height: 1.5;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-header i {
    font-size: 1.25rem;
    color: var(--primary-accent);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0.5rem 0 0.25rem 0.25rem;
}

/* 4. Global Buttons & Badges */
.btn-primary,
.btn-action,
.logout-btn,
.login-btn,
.btn-add-doc {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border: none;
    border-radius: 14px;
    padding: 0.85rem;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
}

.btn-action.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

.btn-action.secondary:active {
    background: rgba(255, 255, 255, 0.15);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-start {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
}

.btn-complete {
    background: linear-gradient(135deg, var(--success), #059669);
}

.btn-reopen {
    background: linear-gradient(135deg, var(--warning), #d97706);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

.status-badge.new {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.in-progress {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 4.1 Plan Info Patterns */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Detail Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.info-value a {
    color: var(--secondary-accent);
    text-decoration: none;
}

/* Alert Patterns */
.glass-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.glass-alert.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.glass-alert i {
    font-size: 1.25rem;
}

.alert-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.alert-desc {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* GPS Area */
.gps-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    text-align: center;
}

.gps-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* GPS status indicator bar (status page) */
.gps-info-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 0.5rem;
    opacity: 0.75;
}

.gps-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.3s;
}

.gps-acquiring {
    background: #f59e0b;
    animation: pulse 1.5s infinite;
}

.gps-ok {
    background: #10b981;
}

.gps-error {
    background: #ef4444;
}

.gps-coords {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.gps-sep {
    color: var(--primary-accent);
}

/* Layout Heleprs */
.actions-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.action-area {
    margin-top: 2rem;
}

/* Task Specific */
.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.task-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
}

.task-meta div {
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-meta i {
    width: 14px;
    color: var(--primary-accent);
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-task-status {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* 5. Dashboard Specific */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.logout-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-card-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1.25rem;
}

.status-icon-box-small {
    width: 42px;
    height: 42px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-accent);
    font-size: 1.1rem;
}

.status-details {
    flex: 1;
}

.status-label-small {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-live {
    font-size: 0.9rem;
    font-weight: 700;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #475569;
}

.indicator-dot.active {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.menu-item i {
    font-size: 1.6rem;
    color: var(--primary-accent);
}

/* 6. Chat System (messages.html) */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.25rem calc(160px + var(--safe-area-bottom));
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
    padding: 0.85rem 1.15rem;
    border-radius: 20px;
    font-size: 0.95rem;
    position: relative;
    line-height: 1.4;
    color: white;
}

.message-sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.message-received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--glass-border);
}

.message-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-top: 4px;
    text-align: right;
}

.input-area {
    position: fixed;
    bottom: 85px;
    left: 0;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 50;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0.75rem 1.25rem;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    max-height: 120px;
}

.send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--primary-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    opacity: 0.5;
    gap: 1rem;
}

.empty-chat i {
    font-size: 3rem;
}

/* 7. Documents System (documents.html) */
.doc-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.5rem;
    padding-bottom: 2rem;
}

.doc-card {
    padding: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.doc-card:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.08);
}

.thumb-area {
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

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

.doc-type-icon {
    font-size: 2.2rem;
    opacity: 0.8;
}

.doc-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* for truncation */
}

.doc-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.doc-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.doc-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-shrink: 0;
}

.action-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.action-icon-btn:active {
    background: var(--primary-accent);
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 8. Status Page (status.html) */
.current-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.status-badge-large {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.status-icon-glow {
    width: 54px;
    height: 54px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-accent);
    font-size: 1.5rem;
}

.status-details h2 {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1px;
}

.status-details p {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.indicator-dot.break {
    background: var(--warning);
    box-shadow: 0 0 10px var(--warning);
}

.indicator-dot.inactive {
    background: var(--danger);
}

.status-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-option {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.status-option.selected {
    border-color: var(--primary-accent);
    background: rgba(99, 102, 241, 0.1);
}

.select-dot {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    position: relative;
}

.selected .select-dot::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-accent);
    border-radius: 50%;
    top: 3px;
    left: 3px;
}

.option-info h3 {
    font-size: 1.05rem;
    margin: 0;
}

.option-info p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 2px 0 0;
}

.option-icon {
    font-size: 1.25rem;
}

.option-icon.active {
    color: var(--success);
}

.option-icon.break {
    color: var(--warning);
}

.option-icon.inactive {
    color: var(--danger);
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    z-index: 1000;
    display: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-premium);
}

/* 9. Forms & Date Navigator */
.date-navigator {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border-radius: 20px;
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
}

.nav-arrow {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
}

.date-display {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
}

.human-date {
    font-weight: 700;
    font-size: 0.95rem;
}

.full-date {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.hidden-date-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.form-control,
.form-control-custom {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 0.95rem;
}

.form-control-custom option {
    background-color: var(--bg-dark);
    color: white;
}

/* 14. Profile Page (profile.html) */
.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
}

.avatar-container {
    width: 100px;
    height: 100px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

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

.avatar-placeholder {
    font-size: 3rem;
    color: white;
}

.profile-hero h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.profile-hero p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 5px 0 0;
}

.detail-item,
.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item:last-child,
.toggle-item:last-child {
    border-bottom: none;
}

.detail-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-info i {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-accent);
    font-size: 0.9rem;
}

.detail-info span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Switch Styling */
.switch,
.switch-small {
    position: relative !important;
    display: inline-block;
    overflow: hidden;
}

.switch {
    width: 44px;
    height: 24px;
}

.switch-small {
    width: 38px;
    height: 20px;
}

.switch input,
.switch-small input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider-toggle,
.switch-small .slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.switch .slider-toggle:before,
.switch-small .slider-toggle:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch-small .slider-toggle:before {
    height: 14px;
    width: 14px;
}

.switch input:checked+.slider-toggle,
.switch-small input:checked+.slider-toggle {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
}

.switch input:checked+.slider-toggle:before {
    transform: translateX(20px);
}

.switch-small input:checked+.slider-toggle:before {
    transform: translateX(18px);
}

.logout-btn {
    margin-top: 1rem;
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    box-shadow: none !important;
}

/* 10. Modals & Overlays */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: none;
}

.upload-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1e293b;
    border-radius: 24px 24px 0 0;
    padding: 1.5rem 1.5rem calc(1.5rem + var(--safe-area-bottom));
    z-index: 150;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-modal.active {
    transform: translateY(0);
}

.modal-drag-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: -0.5rem auto 1.5rem;
}

.file-input-wrapper {
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
}

/* 11. Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(75px + var(--safe-area-bottom));
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 1rem var(--safe-area-bottom);
    z-index: 100;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
}

.nav-link.active {
    color: var(--primary-accent);
}

.nav-center-btn {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    margin-top: -28px;
    border: 3px solid var(--bg-dark);
}

/* 12. PWA & Misc */
.pwa-install-container {
    margin: 0 0 1.25rem;
}

.pwa-install-card {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 20px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

#installButton {
    background: white;
    color: var(--primary-accent);
    border: none;
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
}

/* 13. Login Page Specific */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.login-container .container {
    width: 100%;
    max-width: 400px;
}

.login-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 18px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 2rem;
}

.version-info {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 2rem;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

/* Media Queries */
@media (max-width: 350px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .doc-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .main-content {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Modals */
/* 15. Native Mobile Modals */
.mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-modal.active {
    visibility: visible;
    pointer-events: auto;
}

.mobile-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-modal.active .mobile-modal-overlay {
    opacity: 1;
}

.mobile-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 90vh;
    background: #1e293b;
    border-radius: 30px 30px 0 0;
    padding: 1.25rem 1.5rem calc(1.5rem + var(--safe-area-bottom));
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.1);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.modal-scrollable-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    margin-right: -5px;
    -webkit-overflow-scrolling: touch;
}

.mobile-modal.active .mobile-modal-content {
    transform: translateY(0);
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: -0.5rem auto 1.5rem;
}

.status-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.status-option-btn {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    font-weight: 500;
    text-align: center;
}

.status-option-btn.selected {
    border-color: var(--primary-accent);
    background: rgba(99, 102, 241, 0.1);
}

/* Service Actions Styles */
.actions-grid-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 1rem;
}

.action-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 100px;
    position: relative;
}

.action-item:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

.action-icon {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-accent);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.action-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.action-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--success);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    border-left: 3px solid var(--primary-accent) !important;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.history-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
}

.history-item-time {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.history-item-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.delete-action-btn {
    background: transparent;
    border: none;
    color: var(--danger);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 0;
    opacity: 0.6;
}

.delete-action-btn:active {
    background: rgba(239, 68, 68, 0.1);
    opacity: 1;
    transform: scale(0.9);
}

.delete-action-btn i {
    font-size: 0.9rem;
}

/* Select Dropdown Fix - White on white text visibility */
.form-control-custom option {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
}