/* AIRA Dashboard Styles */

/* ===== CSS Variables ===== */
:root {
    --sidebar-bg: #3D5F3E;
    --sidebar-text: #A8C5A8;
    --sidebar-hover: #4A7A4B;
    --sidebar-active: #FFFFFF;
    --main-bg: #F5F5F5;
    --card-bg: #FFFFFF;
    --text-primary: #2C2C2C;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #E0E0E0;
    --accent-gold: #B8860B;
    --danger: #C85A54;
    --success: #5A7D5A;
    --success-light: #E8F5E9;
}

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--main-bg);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

/* ===== Typography ===== */
.heading-xl {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

.heading-lg {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.heading-md {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.heading-sm {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.text-body {
    font-size: 1rem;
    color: var(--text-secondary);
}

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

.text-caption {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Sidebar Navigation ===== */
.nav-item.active {
    background-color: var(--sidebar-active);
    color: var(--sidebar-bg);
}

.nav-item.active svg {
    stroke: var(--sidebar-bg);
}

/* ===== Cards ===== */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.card-body {
    padding: 1.5rem;
}

/* Metric Cards */
.metric-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.metric-change.positive {
    color: var(--success);
}

.metric-change.negative {
    color: var(--danger);
}

/* Status Cards */
.status-card {
    background: linear-gradient(135deg, #f0f7f0 0%, #e8f5e9 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.status-icon {
    width: 80px;
    height: 80px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
}

.status-icon .checkmark {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--success);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--sidebar-bg);
    color: white;
}

.btn-primary:hover {
    background: var(--sidebar-hover);
}

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

.btn-secondary:hover {
    background: var(--main-bg);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(200, 90, 84, 0.1);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    background: var(--accent-gold);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.btn-icon.secondary {
    background: var(--main-bg);
    color: var(--text-secondary);
}

.btn-icon.secondary:hover {
    background: var(--border);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--card-bg);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--sidebar-bg);
    box-shadow: 0 0 0 3px rgba(61, 95, 62, 0.1);
}

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

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    border-radius: 28px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle input:checked + .toggle-slider {
    background-color: var(--sidebar-bg);
}

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

/* Time Input */
.time-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--card-bg);
    min-width: 100px;
}

.time-input:focus {
    outline: none;
    border-color: var(--sidebar-bg);
}

/* ===== Service List Items ===== */
.service-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1.5rem;
}

.service-item:last-child {
    border-bottom: none;
}

.service-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    color: var(--text-muted);
    min-width: 40px;
}

.service-info {
    flex: 1;
}

.service-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.service-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.service-meta svg {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.service-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== Hours/Availability Row ===== */
.hours-row {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    gap: 1.5rem;
}

.hours-day {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.125rem;
    color: var(--text-primary);
    min-width: 120px;
}

.hours-times {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

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

/* ===== Profile Section ===== */
.profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.profile-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== Action Buttons Row ===== */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--main-bg);
}

.action-btn.danger {
    color: var(--danger);
}

.action-btn.danger:hover {
    background: rgba(200, 90, 84, 0.1);
}

/* ===== Industry Grid ===== */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.industry-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: var(--main-bg);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.industry-item:hover {
    background: var(--card-bg);
    border-color: var(--border);
}

.industry-item.selected {
    background: var(--success-light);
    border-color: var(--sidebar-bg);
}

.industry-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
}

.industry-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ===== Stats Row ===== */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1.5rem;
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

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

.modal-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    background: transparent;
}

.modal-close:hover {
    background: var(--main-bg);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ===== Loading States ===== */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--main-bg) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== Toast Notification ===== */
#toast.show {
    transform: translateY(0);
    opacity: 1;
}

#toast.success {
    background: var(--success);
}

#toast.error {
    background: var(--danger);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

    .main-content {
        margin-left: 0;
    }

    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 40;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    .heading-xl {
        font-size: 2rem;
    }

    .heading-lg {
        font-size: 1.5rem;
    }

    .metric-card {
        padding: 1rem;
    }

    .metric-value {
        font-size: 2rem;
    }

    .hours-row {
        flex-wrap: wrap;
    }

    .hours-times {
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .stats-row {
        gap: 1.5rem;
    }

    #page-content {
        padding: 1rem;
    }
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
