/* ========================================
   ADMIN PANEL STYLES
======================================== */
:root {
    --primary-color: #e91e63;
    --primary-light: #f8bbd0;
    --primary-dark: #c2185b;
    --secondary-color: #ff6090;
    
    --text-dark: #2d2d2d;
    --text-light: #6b6b6b;
    --text-muted: #9e9e9e;
    
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --bg-pink-light: #fff5f7;
    
    --border-color: #f0f0f0;
    --shadow-sm: 0 2px 8px rgba(233, 30, 99, 0.08);
    --shadow-md: 0 4px 16px rgba(233, 30, 99, 0.12);
    --shadow-lg: 0 8px 32px rgba(233, 30, 99, 0.16);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --info: #2196f3;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ========================================
   LOGIN SCREEN
======================================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 24px;
}

.login-container {
    background: var(--bg-white);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
}

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

.login-header i {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 600;
}

.login-header p {
    color: var(--text-light);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ========================================
   ADMIN DASHBOARD
======================================== */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header i {
    font-size: 32px;
    color: var(--primary-color);
}

.sidebar-title h2 {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.2;
}

.sidebar-title p {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-pink-light);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.nav-item.active .badge {
    background: white;
    color: var(--primary-color);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 32px;
    color: var(--text-dark);
    font-weight: 600;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.admin-user i {
    font-size: 24px;
    color: var(--primary-color);
}

.admin-user span {
    color: var(--text-dark);
    font-weight: 500;
}

/* Content Views */
.content-view {
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.stat-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 20px;
    align-items: center;
    transition: all 0.2s;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-icon.appointments {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.stat-icon.questions {
    background: linear-gradient(135deg, var(--info), #64b5f6);
}

.stat-icon.confirmed {
    background: linear-gradient(135deg, var(--success), #81c784);
}

.stat-icon.total {
    background: linear-gradient(135deg, var(--warning), #ffb74d);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-number {
    font-size: 32px;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.dashboard-card h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-card h3 i {
    color: var(--primary-color);
}

.upcoming-list,
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.list-item h4 {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-weight: 600;
}

.list-item p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.list-item .item-date {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========================================
   VIEW HEADER
======================================== */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-light);
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-light);
    background: var(--bg-pink-light);
}

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

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

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

.data-table thead {
    background: var(--bg-pink-light);
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-light);
}

.data-table tbody tr {
    transition: all 0.2s;
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

.no-data {
    text-align: center;
    padding: 48px 24px !important;
    color: var(--text-muted);
}

.no-data i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

.no-data p {
    font-size: 16px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-badge.confirmed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.cancelled {
    background: #ffebee;
    color: #c62828;
}

.status-badge.unread {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge.read {
    background: #f3e5f5;
    color: #6a1b9a;
}

.status-badge.answered {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

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

.action-btn.view:hover {
    background: #e3f2fd;
}

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

.action-btn.confirm:hover {
    background: #e8f5e9;
}

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

.action-btn.delete:hover {
    background: #ffebee;
}

/* ========================================
   QUESTIONS
======================================== */
.questions-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: all 0.2s;
}

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

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.question-info h4 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-weight: 600;
}

.question-info p {
    font-size: 13px;
    color: var(--text-light);
}

.question-subject {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 12px;
}

.question-message {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* ========================================
   FORMS
======================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    transition: all 0.2s;
    background: var(--bg-white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

/* ========================================
   BUTTONS
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #388e3c;
}

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

.btn-danger:hover {
    background: #d32f2f;
}

/* ========================================
   MODAL
======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h2 {
    font-size: 22px;
    color: var(--text-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header i {
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 24px;
}

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

.detail-row {
    margin-bottom: 20px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.detail-value {
    font-size: 15px;
    color: var(--text-dark);
}

/* ========================================
   TOAST
======================================== */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--text-dark);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transform: translateY(200%);
    transition: all 0.3s;
    z-index: 10001;
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
}

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

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

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 968px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1000;
    }

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

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

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

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

    .view-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        min-width: 100%;
    }

    .filter-buttons {
        overflow-x: auto;
    }

    .table-container {
        overflow-x: auto;
    }
}

@media (max-width: 640px) {
    .login-container {
        padding: 32px 24px;
    }

    .main-content {
        padding: 16px;
    }

    .admin-header h1 {
        font-size: 24px;
    }
}

