/* assets/css/style-pc.css - PC/Desktop UI styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1741a6;
    --primary-light: #60a5fa;
    --primary-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
    --bg: #f1f4f9;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e7eaf0;
    --danger: #ef4444;
    --sidebar-width: 240px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar (permanent nav) ---- */
.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 22px 0;
    flex-shrink: 0;
    position: relative;
    box-shadow: 2px 0 10px rgba(15, 23, 42, 0.02);
}
.sidebar .brand {
    padding: 0 22px 22px;
    font-weight: 800;
    font-size: 19px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.01em;
}
.sidebar .profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    margin: 0 12px 18px;
    background: var(--bg);
    border-radius: 12px;
    cursor: pointer;
    border: none;
    width: calc(100% - 24px);
    text-align: left;
    transition: background 0.15s ease;
}
.sidebar .profile-btn:hover { background: #e9eef7; }
.sidebar .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.sidebar .profile-btn .name { font-weight: 700; font-size: 14px; }
.sidebar .profile-btn .role { font-size: 12px; color: var(--text-light); }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    margin: 2px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar nav a:hover { background: #f1f5fb; }
.sidebar nav a.active {
    background: linear-gradient(90deg, #eff6ff, #f6f9ff);
    color: var(--primary);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--primary);
}
.sidebar nav a .icon { font-size: 18px; width: 22px; text-align: center; }

/* ---- Main content ---- */
.main {
    flex: 1;
    padding: 32px 40px;
    max-width: 920px;
}
.page-header {
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 26px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(15, 23, 42, 0.03);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    padding-bottom: 13px;
    border-bottom: 1.5px solid var(--border);
    font-size: 16px;
    color: var(--primary);
    text-transform: none;
    letter-spacing: 0.01em;
    font-weight: 800;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.stat-box {
    background: var(--bg);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: transform 0.15s ease;
}
.stat-box:hover { transform: translateY(-2px); }
.stat-box .value { font-size: 23px; font-weight: 800; color: var(--primary); }
.stat-box .label { font-size: 12px; color: var(--text-light); margin-top: 4px; font-weight: 600; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; max-width: 400px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-light);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: #fbfcfe;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.form-row { display: flex; gap: 16px; }

.btn {
    display: inline-block;
    padding: 11px 26px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.05); box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28); }
.btn:active { transform: translateY(1px); }

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    max-width: 600px;
    border-left: 4px solid transparent;
}
.alert-success { background: #ecfdf3; color: #166534; border-left-color: #16a34a; }
.alert-error { background: #fef2f2; color: #991b1b; border-left-color: #ef4444; }

/* ---- Profile switcher dropdown ---- */
.profile-dropdown {
    position: absolute;
    top: 66px;
    left: 12px;
    width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    z-index: 200;
    display: none;
    overflow: hidden;
}
.profile-dropdown.open { display: block; }
.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    transition: background 0.15s ease;
}
.profile-dropdown a:hover { background: var(--bg); }
.profile-dropdown a.current { background: #eff6ff; color: var(--primary); font-weight: 700; }

/* ---- Profile select grid (index, no profile yet) ---- */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 720px;
    margin: 50px auto;
}
.profile-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px 14px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.profile-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.profile-card .avatar-lg {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 23px;
    margin: 0 auto 12px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
}
.profile-card .name { font-weight: 700; font-size: 15px; }
.profile-card .role { font-size: 12px; color: var(--text-light); }

/* ---- Option chips & history ---- */
.option-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.option-chip {
    padding: 9px 18px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.option-chip.selected { background: var(--primary-gradient); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25); }

table.history-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.history-table th, table.history-table td {
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
}
table.history-table tr:hover td { background: #fafbfd; }
table.history-table th { color: var(--text-light); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Report / Print styles ---- */
.report-section { margin-bottom: 26px; }
.report-section h3 { font-size: 13px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 8px; font-weight: 700; }

@media print {
    .sidebar, .btn-print { display: none !important; }
    body { background: #fff; }
    .main { max-width: 100%; padding: 10px 20px; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}
