/* Admin Dashboard Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* Login Page */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    animation: fadeIn 0.6s ease-out;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 30px 30px;
    text-align: center;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: bounceIn 0.8s ease-out;
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.login-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.login-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 15px;
    color: #667eea;
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    accent-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-size: 1rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 5px;
    display: none;
    font-size: 0.9rem;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.login-info {
    padding: 20px 40px;
    background: #f8f9fa;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

/* Dashboard Layout */
.admin-dashboard {
    display: flex;
    height: 100vh;
}

.admin-dashboard.hidden {
    display: none;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sidebar-header {
    padding: 25px 25px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
}

.sidebar-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h3::before {
    content: '⚙️';
    font-size: 1.5rem;
}

.logo img {
    display: none;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
}

.sidebar-menu ul {
    list-style: none;
    padding: 15px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 22px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 5px 10px;
    border-radius: 8px;
}

.menu-item:hover {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    padding-left: 25px;
}

.menu-item.active {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-right: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.menu-item i {
    font-size: 1.1rem;
    min-width: 20px;
    transition: all 0.3s ease;
}

.menu-item:hover i {
    transform: scale(1.1);
}

.menu-item.active i {
    color: #ffc107;
}

.badge {
    margin-left: auto;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.sidebar-footer {
    padding: 20px;
    border-top: 2px solid rgba(102, 126, 234, 0.3);
    margin-top: auto;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.logout-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.logout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.35);
    background: linear-gradient(135deg, #d73d2d 0%, #b82c1f 100%);
}

.logout-btn:active {
    transform: translateY(-1px);
}

/* Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-topbar {
    background: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #333;
    margin-right: 20px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
    justify-content: flex-end;
}

.search-box {
    position: relative;
    width: 300px;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    font-size: 2rem;
    color: #667eea;
}

.profile-info span {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.profile-info small {
    color: #999;
    font-size: 0.8rem;
}

/* Content Area */
.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select,
.btn-export,
.btn-save,
.btn-confirm,
.btn-cancel,
.btn-complete {
    padding: 11px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-select {
    background: white;
    border: 2px solid #e0e0e0;
    color: #333 !important;
    font-weight: 600;
}

.filter-select option {
    color: #333;
    background: white;
}

.filter-select:hover {
    border-color: #667eea;
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.15);
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-export {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-export:active {
    transform: translateY(0);
}

.btn-save {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.btn-save:active {
    transform: translateY(0);
}

.btn-confirm {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: white;
    flex: 1;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.btn-confirm:active {
    transform: translateY(0);
}

.btn-cancel {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    flex: 1;
}

.btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.btn-cancel:active {
    transform: translateY(0);
}

.btn-complete {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    flex: 1;
}

.btn-complete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-complete:active {
    transform: translateY(0);
}

/* Tables Container */
#usersTablesContainer {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Tables */
.appointments-table-container,
.users-table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
}

.appointments-table,
.users-table {
    width: 100%;
    border-collapse: collapse;
}

.appointments-table thead,
.users-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.appointments-table th,
.users-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.appointments-table td,
.users-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.appointments-table tbody tr:hover,
.users-table tbody tr:hover {
    background: #f8f9fa;
}

/* Date header row styling */
.date-header-row {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.date-header-row:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.date-header-row td {
    border-bottom: 2px solid #667eea;
    color: white !important;
    font-weight: 600;
    padding: 12px 15px !important;
    font-size: 0.95rem;
}

.date-header-row td i {
    margin-right: 8px;
}

/* User data row styling */
.user-data-row {
    transition: background-color 0.2s ease;
}

.user-data-row:hover {
    background: #f0f2ff;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-view,
.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-view {
    background: #3498db;
    color: white;
}

.btn-view:hover {
    background: #2980b9;
}

.btn-edit {
    background: #f39c12;
    color: white;
}

.btn-edit:hover {
    background: #e67e22;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-data p {
    font-size: 1.1rem;
}

/* Pending Cards */
.pending-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.pending-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #ffc107;
    animation: slideUp 0.6s ease-out;
}

.pending-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.pending-info {
    margin-bottom: 15px;
}

.pending-info-row {
    display: flex;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.pending-info-label {
    font-weight: 600;
    color: #667eea;
    min-width: 120px;
}

.pending-info-value {
    color: #666;
}

.pending-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
}

.stat-info p {
    color: #999;
    font-size: 0.9rem;
}

/* Settings */
.settings-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.settings-group {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.settings-group h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

.settings-group .form-group {
    margin-bottom: 20px;
}

.settings-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.settings-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.settings-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

.appointment-modal-content {
    padding: 40px;
}

.modal-close {
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal h2 {
    color: #333;
    margin-bottom: 20px;
}

#appointmentModalBody {
    margin-bottom: 25px;
}

.modal-detail {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-detail-label {
    font-weight: 600;
    color: #667eea;
}

.modal-detail-value {
    color: #333;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 25px;
    border-top: 1px solid #e0e0e0;
    padding-top: 25px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 250px;
    }

    .search-box {
        width: 200px;
    }

    .settings-container {
        grid-template-columns: 1fr;
    }

    .pending-cards {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-dashboard {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-toggle {
        display: block;
    }

    .admin-main {
        width: 100%;
    }

    .topbar-right {
        flex-wrap: wrap;
        gap: 15px;
    }

    .search-box {
        width: 100%;
        order: 3;
    }

    .appointments-table,
    .users-table {
        font-size: 0.85rem;
    }

    .appointments-table td,
    .users-table td,
    .appointments-table th,
    .users-table th {
        padding: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }

    .pending-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .admin-content {
        padding: 15px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .filter-select,
    .btn-export {
        width: 100%;
    }

    .appointments-table-container,
    .users-table-container {
        overflow-x: auto;
    }

    .action-buttons {
        flex-direction: column;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .pending-cards {
        grid-template-columns: 1fr;
    }
}

/* Notification Styles */
.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    animation: blink 1s infinite;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
}

@keyframes blink {
    0%, 49% {
        background: #ff4444;
        box-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
    }
    50%, 100% {
        background: #cc0000;
        box-shadow: 0 0 15px rgba(255, 68, 68, 1);
    }
}

.notification-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4444 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    animation: slideInDown 0.5s ease-out;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
    font-size: 0.9rem;
}

.notification-alert i {
    font-size: 1.2rem;
    animation: pulse 1.5s infinite;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Action Popup Styles */
.action-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.popup-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
    max-width: 400px;
}

.action-popup.success .popup-icon {
    color: #4CAF50;
    font-size: 4rem;
    margin-bottom: 20px;
}

.action-popup.error .popup-icon {
    color: #ff6b6b;
    font-size: 4rem;
    margin-bottom: 20px;
}

.popup-message {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

.popup-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.popup-btn:active {
    transform: translateY(0);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Admin Print Modal Styles */
.admin-print-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.admin-print-modal.hidden {
    display: none;
}

.admin-print-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.admin-print-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff6b6b;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.admin-print-close-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.admin-print-action-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    z-index: 1;
}

.admin-print-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.admin-print-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: white;
}

/* A4 Vertical Page Layout */
.admin-print-page {
    width: 210mm;
    height: 297mm;
    margin: 0 auto;
    padding: 0;
    background: white;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Letterhead Space - 40mm for hospital letterhead */
.admin-print-header-space {
    width: 100%;
    height: 40mm;
    border-bottom: 1px solid #999;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 11px;
    flex-shrink: 0;
}

/* Main Content Body */
.admin-print-body {
    flex: 1;
    padding: 15mm;
    display: flex;
    flex-direction: column;
    gap: 10mm;
    overflow: hidden;
    font-size: 9pt;
}

/* Section Styling */
.admin-print-section {
    display: flex;
    flex-direction: column;
    gap: 4mm;
}

.admin-print-section-title {
    font-weight: 700;
    font-size: 10pt;
    color: #000;
    border-bottom: 1.5px solid #333;
    padding-bottom: 2mm;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Appointment Details Grid */
.admin-print-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8mm;
    background: #f5f5f5;
    padding: 5mm;
    border: 0.5pt solid #ddd;
}

.admin-print-detail-item {
    display: flex;
    gap: 4mm;
}

.admin-print-detail-label {
    font-weight: 600;
    color: #333;
    min-width: 35mm;
}

.admin-print-detail-value {
    color: #000;
    flex: 1;
}

/* Patient Information Grid */
.admin-print-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6mm 8mm;
}

.admin-print-info-row {
    display: flex;
    gap: 4mm;
    align-items: flex-start;
}

.admin-print-info-label {
    font-weight: 600;
    color: #333;
    min-width: 30mm;
    flex-shrink: 0;
}

.admin-print-info-value {
    color: #000;
    flex: 1;
    padding: 1mm 2mm;
    border: 0.5pt solid #ddd;
    background: white;
}

/* Medical Information Grid */
.admin-print-medical-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6mm 8mm;
}

.admin-print-medical-item {
    display: flex;
    flex-direction: column;
    gap: 2mm;
}

.admin-print-medical-item.admin-print-full-width {
    grid-column: 1 / -1;
}

.admin-print-medical-label {
    font-weight: 600;
    color: #333;
    font-size: 8pt;
    text-transform: uppercase;
}

.admin-print-medical-value {
    color: #000;
    font-size: 9pt;
    padding: 3mm;
    border: 0.5pt solid #ddd;
    background: white;
    min-height: 12mm;
    line-height: 1.3;
}

/* Doctor's Prescription Box */
.admin-prescription-box {
    border: 2px solid #333;
    padding: 10mm;
    background: white;
    min-height: 60mm;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

/* Signature Section */
.admin-print-signature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15mm;
    margin-top: auto;
}

.admin-print-signature-block {
    display: flex;
    flex-direction: column;
    gap: 3mm;
}

.admin-print-signature-line {
    height: 25mm;
    border-top: 1pt solid #333;
    margin-top: 5mm;
}

.admin-print-signature-name {
    font-size: 8pt;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Print Button Styling */
.btn-print {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
    color: white !important;
}

.btn-print:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%) !important;
}

/* Admin Print Styles - A4 Page */
@media print {
    /* Hide all non-print elements */
    * {
        margin: 0 !important;
        padding: 0 !important;
        background: none !important;
        box-shadow: none !important;
    }

    html, body {
        width: 210mm !important;
        height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        page-break-after: avoid;
        page-break-before: avoid;
        overflow: hidden !important;
        background: white !important;
    }

    /* Show only print modal */
    body > *:not(#adminPrintModal) {
        display: none !important;
    }

    .admin-print-modal {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        background: white !important;
        z-index: 9999 !important;
        width: 210mm !important;
        height: 297mm !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
        border: none !important;
        box-shadow: none !important;
    }

    .admin-print-modal.hidden {
        display: block !important;
    }

    .admin-print-modal-content {
        box-shadow: none !important;
        border-radius: 0 !important;
        width: 210mm !important;
        height: 297mm !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        background: white !important;
        border: none !important;
    }

    .admin-print-close-btn,
    .admin-print-action-btn {
        display: none !important;
    }

    .admin-print-content {
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        width: 210mm !important;
        height: 297mm !important;
        display: block !important;
        background: white !important;
        page-break-inside: avoid !important;
    }

    /* Print Page Styling */
    .admin-print-page {
        width: 210mm !important;
        height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
    }

    /* Letterhead Space */
    .admin-print-header-space {
        width: 210mm !important;
        height: 40mm !important;
        border-bottom: 1px solid #333 !important;
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        page-break-inside: avoid !important;
    }

    /* Main Body */
    .admin-print-body {
        flex: 1 !important;
        padding: 15mm !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8mm !important;
        overflow: visible !important;
        font-size: 10pt !important;
        background: white !important;
        page-break-inside: avoid !important;
        color: #000 !important;
    }

    /* Sections */
    .admin-print-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 3mm !important;
        page-break-inside: avoid !important;
    }

    .admin-print-section-title {
        font-weight: 700 !important;
        font-size: 11pt !important;
        color: #000 !important;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 2mm !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        margin: 0 !important;
        background: white !important;
        page-break-inside: avoid !important;
    }

    /* Details Grid */
    .admin-print-details-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6mm !important;
        background: white !important;
        padding: 4mm !important;
        border: 1px solid #333 !important;
        page-break-inside: avoid !important;
    }

    .admin-print-detail-item {
        display: flex !important;
        gap: 3mm !important;
        color: #000 !important;
        background: white !important;
    }

    .admin-print-detail-label {
        font-weight: 600 !important;
        color: #000 !important;
        min-width: 30mm !important;
        background: white !important;
    }

    .admin-print-detail-value {
        color: #000 !important;
        flex: 1 !important;
        background: white !important;
    }

    /* Info Grid */
    .admin-print-info-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 4mm 6mm !important;
        page-break-inside: avoid !important;
        background: white !important;
    }

    .admin-print-info-row {
        display: flex !important;
        gap: 3mm !important;
        align-items: flex-start !important;
        color: #000 !important;
        page-break-inside: avoid !important;
        background: white !important;
    }

    .admin-print-info-label {
        font-weight: 600 !important;
        color: #000 !important;
        min-width: 28mm !important;
        flex-shrink: 0 !important;
        background: white !important;
    }

    .admin-print-info-value {
        color: #000 !important;
        flex: 1 !important;
        padding: 2mm !important;
        border: 1px solid #333 !important;
        background: white !important;
    }

    /* Medical Grid */
    .admin-print-medical-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 4mm 6mm !important;
        page-break-inside: avoid !important;
        background: white !important;
    }

    .admin-print-medical-item {
        display: flex !important;
        flex-direction: column !important;
        gap: 2mm !important;
        page-break-inside: avoid !important;
        background: white !important;
    }

    .admin-print-medical-item.admin-print-full-width {
        grid-column: 1 / -1 !important;
    }

    .admin-print-medical-label {
        font-weight: 600 !important;
        color: #000 !important;
        font-size: 9pt !important;
        text-transform: uppercase !important;
        background: white !important;
    }

    .admin-print-medical-value {
        color: #000 !important;
        font-size: 10pt !important;
        padding: 3mm !important;
        border: 1px solid #333 !important;
        background: white !important;
        min-height: 12mm !important;
        line-height: 1.4 !important;
    }

    /* Prescription Box */
    .admin-prescription-box {
        border: 2px solid #333 !important;
        padding: 8mm !important;
        background: white !important;
        min-height: 50mm !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        color: #000 !important;
        page-break-inside: avoid !important;
    }

    /* Signature Section */
    .admin-print-signature-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12mm !important;
        margin-top: 8mm !important;
        page-break-inside: avoid !important;
        background: white !important;
    }

    .admin-print-signature-block {
        display: flex !important;
        flex-direction: column !important;
        gap: 2mm !important;
        page-break-inside: avoid !important;
        background: white !important;
    }

    .admin-print-signature-line {
        height: 20mm !important;
        border-top: 1pt solid #333 !important;
        margin-top: 3mm !important;
        background: white !important;
    }

    .admin-print-signature-name {
        font-size: 9pt !important;
        font-weight: 600 !important;
        color: #000 !important;
        text-align: center !important;
        background: white !important;
    }

    /* Print specific settings */
    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid !important;
    }

    /* Prevent margins and gaps */
    @page {
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 900px) {
    .admin-print-letterhead {
        grid-template-columns: 1fr;
    }

    .admin-print-left {
        border-right: none;
        border-bottom: 1.5px solid #667eea;
        padding-right: 0;
        padding-bottom: 15px;
        max-height: none;
    }

    .admin-print-right {
        padding-left: 0;
        padding-top: 15px;
    }

    .admin-doctor-signature {
        grid-template-columns: 1fr;
    }
}
/* ============================================
   CUSTOM CONFIRMATION MODAL STYLES
   ============================================ */

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.custom-modal.hidden {
    display: none !important;
}

.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.custom-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.modal-icon i {
    display: block;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-body {
    padding: 25px;
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
}

.modal-body p {
    margin: 0;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.modal-btn-cancel {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.modal-btn-cancel:hover {
    background: #e0e0e0;
    border-color: #999;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.modal-btn-confirm:active {
    transform: translateY(0);
}

/* Modal Type Variants */
.custom-modal.warning .modal-header {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.custom-modal.warning .modal-icon {
    color: #ff9800;
}

.custom-modal.warning .modal-icon i {
    color: #ff9800;
}

.custom-modal.danger .modal-header {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.custom-modal.danger .modal-icon {
    color: #f44336;
}

.custom-modal.danger .modal-icon i {
    color: #f44336;
}

.custom-modal.success .modal-header {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.custom-modal.success .modal-icon {
    color: #4caf50;
}

.custom-modal.success .modal-icon i {
    color: #4caf50;
}

.custom-modal.info .modal-header {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.custom-modal.info .modal-icon {
    color: #2196f3;
}

.custom-modal.info .modal-icon i {
    color: #2196f3;
}

/* Modal animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Modal */
@media (max-width: 600px) {
    .custom-modal-content {
        width: 95%;
        border-radius: 8px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
        font-size: 0.95rem;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .modal-btn {
        width: 100%;
    }
}