/* 
   THESISLOG DEMO - MODERN CSS
   Replace your existing styles.css with this file
   All IDs and classes remain unchanged - only styling updated
*/

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-primary);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* App Header */
.app-header {
    font-size: 24px;
    font-weight: 800;
    background: white;
    border-radius: 12px;
    padding: 12px 24px;
    width: fit-content;
    text-decoration: none;
    color: var(--text-primary);
    display: inline-block;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
}

.app-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Account Button */
.account-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    margin-left: auto;
    display: block;
    margin-bottom: -76px;
    color: var(--text-primary);
    transition: all 0.2s;
}

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

.account-menu {
    position: absolute;
    top: 80px;
    right: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    padding: 8px;
    display: none;
    z-index: 1000;
    min-width: 180px;
    border: 1px solid var(--border);
}

.account-menu button {
    width: 100%;
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s;
}

.account-menu button:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

/* Header Section */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.header {
    text-align: left;
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.header p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Bottom Button Section */
#bottom-button-sections {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.bottom-button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    color: white;
    background: var(--primary);
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.bottom-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Input Sections */
.input-section {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 8px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.input-group input,
.input-group select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    width: 280px;
    font-size: 15px;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s;
}

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

/* Button Group */
.button-group {
    display: flex;
    gap: 12px;
}

.add-button,
.select-button {
    padding: 12px 24px;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    align-self: flex-end;
    margin-bottom: 4px;
}


.add-button {
    background: var(--secondary);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.add-button:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.select-button {
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.select-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Patient Info */
.patient-info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
}

.patient-info h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.patient-info p {
    font-size: 16px;
    opacity: 0.9;
}

/* Dashboard Button */
.dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.dashboard-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Completion Status Section */
#completion-status-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 4px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

#completion-status-section h3 {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 700;
    padding: 8px 16px;
}

#completion-status-table {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

#completion-status-table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    font-size: 14px;
}

#completion-status-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    cursor: pointer;
    width: auto;
}

.status-row:hover {
    background: var(--bg-secondary);
    transform: scale(1.01);
    transition: 0.15s;
}

#completion-status-table tr {
    transition: background 0.2s;
}

#completion-status-table tr:hover {
    background: var(--bg-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
}

.status-completed {
    background: #dcfce7;
    color: #16a34a;
}

.status-completed::before {
    content: "✓";
    font-weight: 700;
}

.status-incomplete {
    background: #fee2e2;
    color: #dc2626;
}

.status-incomplete::before {
    content: "○";
    font-weight: 700;
}

.status-progress {
    background: #fef3c7;
    color: #d97706;
    text-wrap: nowrap;
}

.status-progress::before {
    content: "◔";
    font-weight: 700;
}

/* Demo Button */
.demoBtn {
    background: var(--primary);
    color: white;
    border-radius: 8px;
    border: none;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: block;
    width: fit-content;
    margin: 8px auto;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.demoBtn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Footer Label */
body > label {
    display: block;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 32px;
    font-weight: 600;
}

/* Dropdown Styling */
.dropdown {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

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

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 24px;
    }

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

    #bottom-button-sections {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .bottom-button {
        width: 64%;
        text-align: center;
    }

    .input-section {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group input,
    .input-group select {
        width: 100%;
    }

    .header-row {
        flex-direction: column;
        align-items: center;
    }
    .button-group{
        display: flex;
        justify-content: center;
    }
    
    #completion-status-section h3 {
        text-align: center;
        border-bottom: solid 1px #ccc;
    }
    #completion-status-table {
        font-size: 12px;
        margin-left: 0;
        width: 100%;
        overflow-x: hidden;
    }

    #completion-status-table th {
        text-align: left;
        border-bottom:1px solid #ccc;
        text-wrap: nowrap;
    }
    #completion-status-table td {
        padding: 12px 4px;
    }
    /* center only 2nd column header */
    #completion-status-table th:nth-child(2) {
        text-align: center;
        padding-right: 32px;
    }

    /* (optional but recommended) center badges too */
    #completion-status-table td:nth-child(2) {
        text-align: center;
        width: 100%;
        padding: 12px;
    }

    /* make last column expand */
    #completion-status-table th:last-child{
        padding: 14px 8px;
        text-align: center;
    }
    #completion-status-table td:last-child {
        text-align: center;
    }

    .select-button{
        align-self: center;
    }
}

@media (max-width: 480px) {
    .app-header {
        font-size: 18px;
        padding: 10px 16px;
    }

    .bottom-button {
        font-size: 14px;
        padding: 10px 16px;
    }

    .status-badge {
        font-size: 12px;
        padding: 4px 10px;
    }
}
/* =========================
   SKELETON LOADER
========================= */

.status-skeleton {
    padding: 16px 28px;
}

.skeleton-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.skeleton-cell {
    height: 20px;
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #f8f8f8 50%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-text {
    height: 20px;
}

.skeleton-badge {
    height: 28px;
    width: 120px;
    border-radius: 14px;
}

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .skeleton-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .skeleton-badge {
        width: 100px;
    }
}