:root{
    --bg:#f7f9fb;
    --card:#ffffff;
    --muted:#6b7280;
    --accent:#2563eb;
    --accent-2:#0ea5a4;
    --border:#e6eef8;
    --radius:8px;
    --max-width:100vw;
    --gap:1rem;
    --shadow:0 6px 18px rgba(20,30,60,0.08);
    --text:#0f1724;
    --glass:rgba(255,255,255,0.7);
    font-synthesis: none;
}

/* Reset (minimal) */
*{box-sizing:border-box}
html,body{height:100%}
body{
    margin:0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background:var(--bg);
    color:var(--text);
    line-height:1.45;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    padding-top:64px; /* height of sticky nav */
}

/* Top sticky nav */
.top-nav{
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:64px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 1rem;
    background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.92));
    border-bottom:1px solid var(--border);
    backdrop-filter: blur(6px);
    z-index:1000;
    box-shadow:var(--shadow);
}

/* nav sections */
.top-nav .brand{
    display:flex;
    align-items:center;
    gap:0.75rem;
    text-decoration:none;
    color:var(--text);
    font-weight:600;
}
.top-nav .brand .logo{
    width:36px;
    height:36px;
    border-radius:6px;
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    display:inline-block;
    box-shadow:0 4px 10px rgba(37,99,235,0.18);
}
.top-nav nav{
    display:flex;
    align-items:center;
    gap:0.5rem;
}
.top-nav a{
    color:var(--text);
    text-decoration:none;
    font-size:0.95rem;
    padding:0.5rem 0.75rem;
    border-radius:6px;
}
.top-nav a:hover{ background:rgba(37,99,235,0.06); color:var(--accent) }

/* CTA or user area */
.top-nav .actions{
    display:flex;
    align-items:center;
    gap:0.5rem;
}
.btn{
    display:inline-flex;
    align-items:center;
    gap:0.5rem;
    border:0;
    background:var(--accent);
    color:#fff;
    padding:0.5rem 0.85rem;
    border-radius:6px;
    cursor:pointer;
    font-weight:600;
    font-size:0.95rem;
}
.btn .secondary{
    background:transparent;
    color:var(--accent);
    border:1px solid rgba(37,99,235,0.12);
}

/* Page container */
.container{
    max-width:var(--max-width);
    margin:1.25rem auto;
    padding:0 1rem;
}

/* Responsive grid layout */
.layout{
    display:grid;
    grid-template-columns: 280px 1fr;
    gap:var(--gap);
    align-items:start;
}

/* Card */
.card{
    background:var(--card);
    border-radius:var(--radius);
    padding:1rem;
    border:1px solid var(--border);
    box-shadow:var(--shadow);
}

/* Sidebar */
.sidebar{
    position:sticky;
    top:84px; /* a bit below top nav */
    align-self:start;
    height:calc(100vh - 104px);
    overflow:auto;
    padding:0.5rem;
    background:transparent;
}
.sidebar .menu{
    display:flex;
    flex-direction:column;
    gap:0.25rem;
}
.sidebar .menu a{
    padding:0.6rem 0.75rem;
    border-radius:6px;
    color:var(--muted);
    display:flex;
    align-items:center;
    gap:0.6rem;
}
.sidebar .menu a.active, .sidebar .menu a:hover{
    background:rgba(37,99,235,0.06);
    color:var(--accent);
    font-weight:600;
}

/* Main content */
.main{
    min-height:60vh;
    display:flex;
    flex-direction:column;
    gap:var(--gap);
}

/* Header row within main */
.page-header{
    display:flex;
    gap:var(--gap);
    align-items:center;
    justify-content:space-between;
}
.page-title{ font-size:1.25rem; font-weight:700; color:var(--text) }
.page-sub{ color:var(--muted); font-size:0.95rem }

/* Form elements */
.form-row{
    display:grid;
    /*grid-template-columns:repeat(2,1fr); */
    grid-template-columns: 1fr 3fr;
    gap:0.75rem;
    padding-bottom: 10px;
}
.field{
    display:flex;
    flex-direction:column;
    gap:0.35rem;
}

.field-checkbox{
    display:flex;
    flex-direction:column;
    gap:0.1rem;
}
label{ font-size:0.9rem; color:var(--muted) }

input[type="text"], input[type="email"], input[type="date"], select, textarea{
    padding:0.6rem 0.75rem;
    border-radius:6px;
    border:1px solid var(--border);
    background:linear-gradient(180deg,#fff,#fbfdff);
    font-size:0.95rem;
    color:var(--text);
}

.date-input {
    width: 60px;
}

textarea{ min-height:100px; resize:vertical; }

input[type=submit] {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

/* Hover state */
input[type=submit]:hover {
    background-color: var(--accent-2);
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.my-link {
    color: var(--text);
    font-weight: 600;
}

.verified-badge {
    background-color: limegreen;
    color: white;
    padding: 4px 8px;
    text-align: center;
    border-radius: 5px;
    height: 1.5rem;
    line-height: 1rem;
    display: inline-block;
}

.attention-badge {
    background-color: #ff5f00;
    color: white;
    padding: 4px 8px;
    text-align: center;
    border-radius: 5px;
    height: 1.5rem;
    line-height: 1rem;
    display: inline-block;
}

.warning-badge {
    background-color: darkred;
    color: white;
    padding: 4px 8px;
    text-align: center;
    border-radius: 5px;
    height: 1.5rem;
    line-height: 1rem;
    display: inline-block;
}

/* Tables */
table{
    width:100%;
    border-collapse:collapse;
    background:transparent;
}
table th, table td{
    padding: 0.25rem;
    text-align:left;
    border:1px solid black;
    font-size:0.95rem;
}
table th {
    color:var(--muted);
    font-weight:600;
    font-size:0.9rem }

/* Utility rows and cards */
.row{
    display:flex;
    gap:0.75rem;
    align-items:center;
    flex-wrap: wrap;
}

.row-item{
    min-width: 0;
    overflow:hidden;
}
.kpi{
    flex:1;
    padding:0.85rem;
    border-radius:10px;
    background:linear-gradient(180deg, #fff, #fcfdff);
    border:1px solid var(--border);
    box-shadow:0 4px 12px rgba(15,23,36,0.04);
}
.kpi .value{ font-size:1.25rem; font-weight:700 }
.kpi .label{ color:var(--muted); font-size:0.9rem }

/* Small helpers */
.text-muted{ color:var(--muted) }
.small{ font-size:0.85rem }

/* Success/toast for created-record feedback */
.success-message{
    position:fixed;
    right:1rem;
    top:84px;
    display:flex;
    align-items:center;
    gap:0.75rem;
    background:linear-gradient(180deg,#ecfdf5,#f0fdf4);
    border:1px solid rgba(16,185,129,0.15);
    color:#065f46;
    padding:0.6rem 0.9rem;
    border-radius:8px;
    box-shadow:0 8px 20px rgba(16,185,129,0.08);
    z-index:1100;
    min-width:260px;
    font-weight:600;
    animation:fadeIn 260ms ease;
}
/* optional internal elements */
.success-message .icon{
    width:20px;
    height:20px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:rgba(16,185,129,0.12);
    color:#10b981;
    font-size:0.9rem;
}
.success-message .text{ font-size:0.95rem; color:inherit; }
.success-message .close{
    margin-left:auto;
    background:transparent;
    border:0;
    color:inherit;
    cursor:pointer;
    padding:0.25rem;
    font-size:0.95rem;
}
/* hide state for auto-dismiss */
.success-message.hide{
    opacity:0;
    transform:translateY(-8px);
    pointer-events:none;
    transition:opacity 160ms,transform 160ms;
}

/* Responsive adjustments */
@media (max-width:980px){
    .layout{ grid-template-columns:1fr; }
    .sidebar{ position:relative; height:auto; top:0; }
    body{ padding-top:72px }
    .top-nav{ height:72px }
    .top-nav .brand .logo{ width:40px; height:40px }
}

/* Mobile nav: collapse links into a menu button */
.nav-toggle{
    display:none;
    background:transparent;
    border:0;
    font-size:1.1rem;
    color:var(--muted);
}
@media (max-width:720px){
    .top-nav nav{ display:none }
    .nav-toggle{
        display:inline-flex;
        flex-direction: column;
        flex-wrap: wrap;
        align-items:center;
        gap:0.5rem;
    }
    .top-nav .actions{ gap:0.25rem }

    .nav-toggle a{
        position: relative;
        top: 25px;
        display:none;
        color:var(--text);
        text-decoration:none;
        font-size:0.9rem;
        padding:0.5rem 0.75rem;
        border-radius:6px;
    }
}

/* Simple accessible focus states */
/*a:focus, button:focus, input:focus{ outline:3px solid rgba(37,99,235,0.12); outline-offset:2px }*/

/* Footer */
.site-footer{
    margin-top:1.5rem;
    padding:1rem;
    text-align:center;
    color:var(--muted);
    font-size:0.9rem;
}

/* Tiny animation for interactions */
.fade-in{
    animation:fadeIn 220ms ease;
}
@keyframes fadeIn{
    from{ opacity:0; transform:translateY(6px) } to{ opacity:1; transform:none }
}