/* Modern styling for OR Scheduling System */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-color: #333333;
    --text-muted: #6c757d;
    --text-muted-dark: #5a6268;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--light-bg);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
    font-size: 0.9rem;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Messages */
.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.close-message {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
}

.close-message:hover {
    opacity: 1;
}

/* Dashboard Styles */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.welcome-section {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.welcome-section h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.action-button .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-button.primary {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
}

.action-button.secondary {
    background: linear-gradient(135deg, var(--success-color), #219a52);
}

.action-button.tertiary {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
}

.action-button.admin {
    background: linear-gradient(135deg, var(--primary-color), #1a252f);
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Stats Grid */
.stats-grid {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.35rem;
    justify-content: center; /* ← This centers the grid items horizontally */
}

.stat-card {
    background: var(--white);
    padding: 0.35rem 0.5rem;
    border-radius: 1px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: var(--white);
}

.stat-number {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.stat-card.highlight .stat-label {
    color: rgba(255,255,255,0.8);
}

/* Site Stats Summary */
.stats-summary-card {
    background: var(--white);
    border: 0.2px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stats-summary-card--compact {
    padding: 0.35rem 0.5rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

.stats-summary-card--compact .stats-grid {
    gap: 0.25rem;
}

.stats-summary-card--compact .stat-card {
    padding: 0.25rem 0.4rem;
}

.stats-summary-card--compact .stat-number {
    font-size: 11px;
}

.stats-summary-card--compact .stat-label {
    margin-top: 0.2rem;
    font-size: 0.7rem;
}

.stats-summary-card--compact .stats-summary-note {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.stats-summary-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.stat-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-summary.highlight {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: var(--white);
    border-color: var(--secondary-color);
}

.stat-summary-number {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.stat-summary.highlight .stat-summary-label {
    color: rgba(255,255,255,0.9);
}

.stats-summary-note {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Alert Section */
.alert-section {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 10px;
    padding: 1.5rem;
}

.alert-section h3 {
    color: #856404;
    margin-bottom: 1rem;
}

.special-requests {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.request-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.request-info {
    flex: 1;
}

.request-reason {
    flex: 2;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-approve {
    background: var(--warning-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-approve:hover {
    background: #e67e22;
}

/* Availability Table */
.availability-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-month {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    min-width: 150px;
    text-align: center;
}

.nav-button {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.nav-button.prev-month {
    background: var(--text-muted);
}

.nav-button.prev-month:hover {
    background: var(--text-muted-dark);
}

.availability-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.availability-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    position: relative;
}

.availability-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.availability-table thead {
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

.availability-table th,
.availability-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.availability-table th {
    background: var(--light-bg);
    font-weight: 600;
    font-size: 0.85rem;
}

.availability-table .surgeon-name {
    text-align: left;
}

.availability-table .surgeon-name a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.availability-table .surgeon-name small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.availability-table td.status-available {
    background: #d4edda;
    color: #155724;
    font-weight: 500;
}

.availability-table td.status-close {
    background: #fff3cd;
    color: #856404;
    font-weight: 500;
}

.availability-table td.status-full {
    background: #f8d7da;
    color: #721c24;
    font-weight: 500;
}

/* Today's Surgeries */
.todays-surgeries {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.todays-surgeries h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1rem; /* Reduced from default */
}

.surgery-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.surgery-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    align-items: center;
    border-left: 4px solid var(--secondary-color);
}

.surgery-card.status-completed {
    border-left-color: var(--success-color);
}

.surgery-card.status-cancelled_patient,
.surgery-card.status-cancelled_hospital {
    border-left-color: var(--danger-color);
    opacity: 0.7;
}

.surgery-card.status-postponed_illness,
.surgery-card.status-postponed_surgeon {
    border-left-color: var(--warning-color);
}

.surgery-time {
    font-size: 1rem; /* Reduced from 1.2rem */
    font-weight: 600;
    color: var(--primary-color);
}

.surgery-date {
    font-size: 0.8rem; /* Reduced size */
    color: var(--text-muted);
}

.surgery-details strong {
    display: block;
}

.patient-info {
    font-size: 0.85rem; /* Reduced size */
}

.disease-info,
.operation-info {
    font-size: 0.8rem; /* Reduced size */
}

.surgery-operation {
    font-size: 0.75rem; /* Reduced from 0.85rem */
    color: var(--text-muted);
}

.surgery-surgeon {
    color: var(--text-muted);
    font-size: 0.8rem; /* Reduced size */
}

.surgery-status {
    font-size: 0.75rem; /* Reduced size */
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.65rem; /* Reduced from 0.75rem */
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.scheduled {
    background: #cce5ff;
    color: #004085;
}

.status-badge.confirmed {
    background: #d4edda;
    color: #155724;
}

.status-badge.in_progress {
    background: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background: #28a745;
    color: white;
}

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

.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 5px;
    text-decoration: none;
    background: var(--secondary-color);
    color: var(--white);
}

.btn-small.btn-secondary {
    background: var(--text-muted);
}

.btn-small:hover {
    opacity: 0.9;
}

/* Form Styling */
form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

form h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

button[type="submit"] {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: var(--white);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .surgery-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    nav {
        justify-content: center;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-navigation {
        justify-content: center;
    }
    
    .current-month {
        order: -1;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.2rem;
    }
    
    nav a {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Logout Page Styles */
.logout-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 1rem;
}

.logout-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.logout-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.logout-card h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.logout-card p {
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.logout-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-home,
.btn-login {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-home {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-login {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    color: white;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.4);
}

@media (max-width: 480px) {
    .logout-card {
        padding: 2rem 1rem;
    }
    
    .logout-icon {
        font-size: 3rem;
    }
    
    .logout-card h2 {
        font-size: 1.5rem;
    }
    
    .logout-actions {
        flex-direction: column;
    }
    
    .btn-home,
    .btn-login {
        width: 100%;
    }
}


/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
}

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

.login-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.login-header p {
    color: #7f8c8d;
    margin: 0;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
    font-weight: 500;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #3498db;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #2980b9;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #7f8c8d;
}

.alert {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-error {
    background-color: #ffe6e6;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #17a2b8;
}

/* Message Overlay - Full Screen Notifications */
.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-overlay-show {
    opacity: 1;
}

.message-overlay-fadeout {
    opacity: 0;
}

.message-overlay-content {
    background: white;
    padding: 2rem 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideDown 0.3s ease;
}

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

.message-overlay-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.message-overlay-success .message-overlay-icon {
    color: #28a745;
}

.message-overlay-error .message-overlay-icon {
    color: #dc3545;
}

.message-overlay-warning .message-overlay-icon {
    color: #ffc107;
}

.message-overlay-text {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* OK Button for overlay messages */
.message-overlay-ok-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

.message-overlay-ok-button:hover {
    background: #2980b9;
}

.message-overlay-success .message-overlay-ok-button {
    background: #28a745;
}

.message-overlay-success .message-overlay-ok-button:hover {
    background: #218838;
}

.message-overlay-error .message-overlay-ok-button {
    background: #dc3545;
}

.message-overlay-error .message-overlay-ok-button:hover {
    background: #c82333;
}

/* Legacy close button styles (no longer used) */
.message-overlay-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.message-overlay-close:hover {
    color: #333;
}

/* Make sure overlay doesn't interfere with form submissions */
.message-overlay.message-overlay-fadeout {
    pointer-events: none;
}

/* Header Subtitle — Company Attribution */
.header-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.85;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.5px;
}

/* Footer Credit — Company Attribution */
.footer-credit {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

.footer-credit a {
    color: #74b9ff;
    text-decoration: none;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   User Drive Styles
   ══════════════════════════════════════════════════════════ */

.drive-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;
}

.drive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.drive-header h2 {
    margin: 0;
}

.drive-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ── Breadcrumb Navigation ───────────────────────────── */
.drive-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.drive-breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.drive-breadcrumb a:hover {
    text-decoration: underline;
}

.drive-breadcrumb-sep {
    color: #bbb;
}

.drive-breadcrumb-current {
    font-weight: 600;
    color: #333;
}

/* ── Storage Bar ─────────────────────────────────────── */
.storage-bar-container {
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.storage-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: #555;
}

.storage-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 5px;
    transition: width 0.4s ease;
    min-width: 0;
}

.storage-bar-fill.storage-bar-warning {
    background: linear-gradient(90deg, #e67e22, #e74c3c);
}

/* ── Filters ─────────────────────────────────────────── */
.drive-filters {
    margin-bottom: 1.25rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-input {
    flex: 1 1 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
}

.filter-date {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* ── Folder Grid ─────────────────────────────────────── */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.folder-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.folder-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.folder-card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #2c3e50;
}

.folder-card-link:hover {
    color: #3498db;
}

.folder-card-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.folder-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-card-actions {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
}

/* ── Folder Create Form ──────────────────────────────── */
.folder-create-form {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f0f7ff;
    border: 1px solid #b8d8f0;
    border-radius: 8px;
    animation: fadeInDown 0.2s ease;
}

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

.folder-create-form form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.folder-create-input {
    flex: 1 1 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* ── Folder Rename Form ──────────────────────────────── */
.folder-rename-form {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.folder-rename-input {
    flex: 1 1 120px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #3498db;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ── File Grid ───────────────────────────────────────── */
.drive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.drive-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.drive-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.drive-card-preview {
    height: 140px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.drive-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drive-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.drive-card-info {
    padding: 0.6rem 0.75rem;
}

.drive-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.drive-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
}

.drive-card-patient {
    font-size: 0.8rem;
    color: #2c3e50;
    margin-top: 0.2rem;
}

.drive-card-caption {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.15rem;
    font-style: italic;
}

.drive-card-actions {
    padding: 0.5rem 0.75rem 0.75rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

/* ── Empty State ─────────────────────────────────────── */
.drive-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #888;
}

.drive-empty p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* ── Upload Page ─────────────────────────────────────── */
.drive-upload-form {
    max-width: 650px;
    margin: 0 auto;
}

.drop-zone {
    border: 2px dashed #bdc3c7;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.drop-zone:hover,
.drop-zone-active {
    border-color: #3498db;
    background: #eaf2fd;
}

.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.drop-zone p {
    margin: 0.25rem 0;
    font-size: 1rem;
    color: #555;
}

.drop-zone-hint {
    font-size: 0.8rem !important;
    color: #999 !important;
}

.drop-zone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-preview-list {
    margin-top: 1.25rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.file-preview-list h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.file-preview-list ul {
    list-style: none;
    padding: 0;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.file-preview-oversize {
    background: #fff5f5;
}

.file-preview-name {
    flex: 1;
    font-size: 0.9rem;
}

.file-preview-size {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

.file-preview-remove {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.25rem;
}

.upload-fields {
    margin-top: 1.25rem;
}

.upload-fields .form-group {
    margin-bottom: 1rem;
}

.upload-fields label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ── Share Page ──────────────────────────────────────── */
.share-card {
    max-width: 550px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.share-file-info {
    margin-bottom: 1.5rem;
    text-align: center;
}

.share-file-meta {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.25rem;
}

.share-link-box {
    margin-bottom: 1.5rem;
}

.share-link-box label {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.4rem;
}

.share-link-row {
    display: flex;
    gap: 0.5rem;
}

.share-link-input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #f8f9fa;
}

.copy-feedback {
    font-size: 0.85rem;
    color: #27ae60;
    margin-top: 0.3rem;
}

.share-actions {
    text-align: center;
}

.footer-credit a:hover {
    text-decoration: underline;
    color: #a3d1ff;
}
