@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --yellow-accent: #ffd000;
    --yellow-header: #fff200;
    
    --data-bg: #8ecae6;      /* Sky blue */
    --wizard-bg: #f7d6c8;    /* Rose/Orange */
    --report-bg: #c7e9b4;    /* Light green */
    --import-bg: #d8b4fe;    /* Lavender */
    --config-bg: #fed7aa;    /* Peach */
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-sans);
    background-color: #f1f5f9;
    color: #1e293b;
    padding: 20px;
    min-height: 100vh;
}

.app-container {
    max-width: 1300px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Tabs Navigation */
.tabs-nav {
    display: flex;
    background-color: #0f172a;
    border-bottom: 2px solid #334155;
    padding: 10px 20px 0 20px;
}

.tab-btn {
    background: none;
    border: none;
    outline: none;
    color: #94a3b8;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.tab-btn:hover {
    color: #f8fafc;
    background-color: #1e293b;
}

.tab-btn.active {
    color: #0f172a;
    background-color: #f1f5f9;
    font-weight: 600;
}

.tab-btn.active.tab-data-entry {
    background-color: var(--data-bg);
}

.tab-btn.active.tab-report-wizard {
    background-color: var(--wizard-bg);
}

.tab-btn.active.tab-report-format {
    background-color: var(--report-bg);
}

.tab-btn.active.tab-import {
    background-color: var(--import-bg);
}

.tab-btn.active.tab-config {
    background-color: var(--config-bg);
}

/* Tab Contents */
.tab-content {
    display: none;
    padding: 0;
}

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

/* Title Bars */
.title-bar {
    background-color: var(--yellow-header);
    color: #000000;
    padding: 12px 20px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #000000;
    text-transform: uppercase;
}

/* UI Panel styles */
.ui-panel {
    padding: 30px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.panel-data-entry {
    background-color: var(--data-bg);
}

.panel-report-wizard {
    background-color: var(--wizard-bg);
}

.panel-report-format {
    background-color: var(--report-bg);
}

/* Data Entry Form Grid */
.top-details-grid {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background: transparent;
}

.top-details-grid td {
    padding: 8px 12px;
    vertical-align: middle;
}

.grid-label {
    width: 140px;
    font-weight: 600;
    font-size: 15px;
    color: #000000;
}

.grid-input-cell {
    width: 250px;
}

.grid-input-cell input, 
.grid-input-cell select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #000000;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    background-color: #ffffff;
    outline: none;
}

.grid-input-cell input:focus {
    border-color: #1e293b;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.15);
}

/* Layout for Readings/Counts */
.reading-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reading-grid-container {
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

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

.reading-table th {
    background-color: #0f172a;
    color: #ffffff;
    text-align: left;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 2px solid #000000;
}

.reading-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #cbd5e1;
    font-size: 14px;
    vertical-align: middle;
}

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

.label-cell {
    font-weight: 600;
    color: #0f172a;
}

.input-cell {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    background-color: #ffffff;
}

.input-cell:focus {
    border-color: #000000;
}

/* Actions Footers */
.actions-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.btn {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 15px;
    padding: 10px 24px;
    border: 2px solid #000000;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-edit {
    background-color: #e879f9; /* Pink/Purple */
    color: #000000;
}

.btn-edit:hover {
    background-color: #d946ef;
}

.btn-post {
    background-color: var(--yellow-accent);
    color: #000000;
}

.btn-post:hover {
    background-color: #eab308;
}

.btn-post:disabled {
    background-color: #cbd5e1;
    color: #64748b;
    border-color: #94a3b8;
    cursor: not-allowed;
}

.btn-generate {
    background-color: #b45309; /* Brown */
    color: #ffffff;
}

.btn-generate:hover {
    background-color: #92400e;
}

.btn-export {
    background-color: #ef4444; /* Red */
    color: #ffffff;
}

.btn-export:hover {
    background-color: #dc2626;
}

/* Report Wizard Grid Table */
.wizard-grid {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.wizard-grid th {
    background-color: #0f172a;
    color: #ffffff;
    text-align: left;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 2px solid #000000;
}

.wizard-grid td {
    padding: 12px 16px;
    border-bottom: 1px solid #cbd5e1;
    vertical-align: middle;
}

.wizard-grid tr:last-child td {
    border-bottom: none;
}

.wizard-label {
    font-weight: 600;
    font-size: 15px;
    color: #0f172a;
    width: 200px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
}

.form-control:focus {
    border-color: #000000;
}

.chk-container {
    text-align: center;
    width: 80px;
}

.chk-box {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0f172a;
}

/* Report View Table Styles */
.report-view-container {
    max-height: 600px;
    overflow-y: auto;
    border: 2px solid #000000;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    background-color: #ffffff;
}

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

.report-table th {
    background-color: #86efac; /* Light green header */
    color: #000000;
    padding: 12px 16px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    border: 1px solid #000000;
    position: sticky;
    top: 0;
    z-index: 10;
}

.report-table td {
    padding: 12px 16px;
    border: 1px solid #000000;
    font-size: 14px;
    font-weight: 500;
}

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

.report-main-header-row th {
    background-color: #86efac !important;
    text-align: left;
    font-size: 16px;
}

.report-total-row td {
    font-weight: 700;
    background-color: #f8fafc;
    border-top: 2px solid #000000;
}

/* Toast notifications */
.toast-msg {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #0f172a;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    border: 1px solid #334155;
}

.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* Import and Configuration panel styling */
.panel-import {
    background-color: var(--import-bg);
}

.panel-config {
    background-color: var(--config-bg);
}

.import-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.import-card, .config-card {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.import-drag-zone {
    border: 2px dashed #6b21a8;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #fdf4ff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.import-drag-zone:hover {
    background: #fae8ff;
}

/* Configuration Tab Sub-sections styling */
.config-tab-content {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.config-subtab-btn.active {
    background-color: #cbd5e1 !important;
    border-bottom: 2px solid #0f172a !important;
}

.config-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.config-search {
    padding: 8px;
    width: 250px;
    border: 2px solid #000;
    border-radius: 4px;
}

/* Edit styling for report view inline edit */
.inline-edit-input {
    width: 70px;
    padding: 4px;
    border: 1px solid #000000;
    border-radius: 4px;
    text-align: right;
}

/* Login Modal Overlay */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-modal-card {
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    width: 380px;
    max-width: 90%;
    padding: 30px;
}

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

.login-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-header p {
    font-size: 13px;
    color: #64748b;
}

.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.login-field input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #000000;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    outline: none;
}

.login-field input:focus {
    border-color: #e879f9;
}

.login-role-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.role-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #475569;
}

.login-error-msg {
    color: #ef4444;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    background: #fef2f2;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #fca5a5;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #000000;
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
    border: 2px solid #000000;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.15s ease;
}

.btn-login:hover {
    background: #334155;
}

.user-session-bar {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    background: #000000;
    color: #ffffff;
    border-radius: 20px;
}

.btn-logout {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #000000;
    border-radius: 4px;
    cursor: pointer;
}

.btn-logout:hover {
    background: #dc2626;
}

