/* Custom CSS stylesheet matching the State Forensic Science Laboratory, WB */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,700;1,400&display=swap');

:root {
    --primary-color: #1c273d;       /* Deep Royal Blue of WBFSL */
    --accent-color: #cdad68;        /* Sandy Gold of WBFSL */
    --accent-hover: #b89855;
    --bg-light: #f8f9fc;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --success-color: #2ec4b6;
    --danger-color: #e71d36;
    --border-radius: 12px;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Brand */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    border-bottom: 5px solid var(--accent-color);
}

.brand-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdfaf2;
    border: 1px solid rgba(205, 173, 104, 0.3);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.brand-title h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.brand-title p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-right {
    text-align: right;
}

.brand-right p {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
}

.brand-right span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Navigation Bar */
.navbar {
    background-color: var(--primary-color);
    padding: 12px 0;
    box-shadow: var(--box-shadow);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ffffff;
}

.logout-btn {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 6px 14px;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.logout-btn:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

/* Main Container */
main {
    flex: 1;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

/* Cards & Layout */
.card {
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.card-header {
    border-bottom: 2px solid rgba(28, 39, 97, 0.05);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: #ffffff;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(28, 39, 61, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    background-color: #2b3952;
    transform: translateY(-1px);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

/* Centered Form Layout (Login/Setup) */
.auth-container {
    max-width: 480px;
    margin: 60px auto;
    width: 100%;
}

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

.auth-header .brand-logo-container {
    margin: 0 auto 20px auto;
    width: 90px;
    height: 90px;
}

.auth-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Alert Boxes */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background-color: #ffeef0;
    color: var(--danger-color);
    border: 1px solid #ffd0d6;
}

.alert-success {
    background-color: #e8f9f7;
    color: #0b8a78;
    border: 1px solid #c2f0eb;
}

/* Dashboard Table Styles */
.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 450px;
    min-width: 280px;
}

.search-box input {
    padding-left: 45px;
}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #ffffff;
    font-size: 0.9rem;
}

.report-table th, .report-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.report-table th {
    background-color: #f1f5f9;
    color: var(--text-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.report-table tr:last-child td {
    border-bottom: none;
}

.report-table tbody tr {
    transition: var(--transition);
}

.report-table tbody tr:hover {
    background-color: #f8fafc;
}

.report-table td.report-info {
    font-weight: 600;
    color: var(--primary-color);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #f1f5f9;
    color: var(--text-dark);
}

.badge-blue {
    background-color: rgba(28, 39, 61, 0.1);
    color: var(--primary-color);
}

/* Custom Checkbox */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #e2e8f0;
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #cbd5e1;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.empty-state h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 8px;
}

/* API Docs layout */
.doc-section {
    margin-bottom: 40px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 30px;
}

.doc-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.doc-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.api-method {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: #e2e8f0;
    margin-bottom: 15px;
}

.api-method.post {
    background-color: #e3f2fd;
    color: #1e88e5;
}

.api-route {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-dark);
}

.tab-container {
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.tab-headers {
    display: flex;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    border: none;
    background: none;
    padding: 12px 20px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary-color);
    background-color: rgba(0,0,0,0.02);
}

.tab-btn.active {
    color: var(--primary-color);
    background-color: #ffffff;
    border-bottom: 2px solid var(--accent-color);
    font-weight: 700;
}

.tab-panel {
    display: none;
    padding: 20px;
    background-color: #ffffff;
}

.tab-panel.active {
    display: block;
}

pre {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

code {
    font-family: inherit;
}

.doc-table {
    width: 100%;
    margin: 15px 0;
    border-collapse: collapse;
}

.doc-table th, .doc-table td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

.doc-table th {
    background-color: #f8fafc;
    font-weight: 600;
}

/* Footer styling */
footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 20px;
    text-align: center;
    font-size: 0.85rem;
    border-top: 5px solid var(--accent-color);
    margin-top: auto;
}

footer p {
    margin-bottom: 8px;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .brand-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .brand-right {
        text-align: center;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
    }
    
    .nav-user {
        flex-direction: column;
        width: 100%;
    }
    
    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
}
