* { box-sizing: border-box; }
:root {
    --ai-navy: #040b21;
    --ai-blue: #071d35;
    --ai-teal: #20b98f;
    --ai-bg: #f4f8fb;
    --ai-card: #ffffff;
    --ai-text: #101827;
    --ai-muted: #6b7280;
}
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--ai-bg);
    color: var(--ai-text);
}
.topbar {
    min-height: 76px;
    background: #040b21;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    box-shadow: 0 2px 18px rgba(0,0,0,.22);
    border-bottom: 1px solid rgba(32,185,143,.65);
}
.brand {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: bold;
}
.brand-logo-wide {
    width: 90px;
    height: 48px;
    object-fit: contain;
}
.brand-main {
    font-size: 22px;
    letter-spacing: .2px;
}
.brand-sub {
    font-size: 14px;
    color: var(--ai-teal);
    font-weight: normal;
    margin-top: 3px;
}
.user a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}
.layout {
    display: flex;
    min-height: calc(100vh - 116px);
}
.sidebar {
    width: 245px;
    background: #061426;
    padding: 22px 0;
}
.sidebar a {
    display: block;
    color: #eefbfb;
    text-decoration: none;
    padding: 13px 24px;
    border-left: 4px solid transparent;
}
.sidebar a:hover {
    background: #0b2841;
    border-left-color: var(--ai-teal);
}
.content {
    flex: 1;
    padding: 30px;
}
.login-content {
    min-height: calc(100vh - 116px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(90deg, rgba(4,11,33,.94), rgba(7,29,53,.82)),
        url('/assets/images/ai-wallpaper.jpg');
    background-size: cover;
    background-position: center;
}
.card, .stat, .hero-card {
    background: var(--ai-card);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 18px rgba(7,29,43,.08);
    margin-bottom: 22px;
}
.hero-card {
    background: linear-gradient(135deg, #ffffff, #edfdf7);
    border-left: 5px solid var(--ai-teal);
}
.login-card {
    width: 455px;
    text-align: left;
    position: relative;
    z-index: 2;
}
.branded-login {
    border-top: 7px solid var(--ai-teal);
    box-shadow: 0 22px 60px rgba(0,0,0,.30);
}
.login-logo-wrap {
    text-align: center;
    margin-bottom: 6px;
}
.login-logo-wide {
    width: 120px;
    height: 75px;
    object-fit: contain;
}
.login-card h2 {
    text-align: center;
    font-size: 30px;
    margin-bottom: 8px;
}
.portal-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--ai-muted);
    margin-bottom: 24px;
}
.portal-divider span {
    height: 2px;
    width: 70px;
    background: var(--ai-teal);
}
.portal-divider p {
    margin: 0;
    font-size: 17px;
}
h1, h2, h3 {
    margin-top: 0;
    color: var(--ai-navy);
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.stat .number {
    font-size: 34px;
    font-weight: bold;
    color: var(--ai-blue);
}
.stat {
    border-bottom: 4px solid var(--ai-teal);
}
label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
    color: var(--ai-navy);
}
input, select, textarea {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    border: 1px solid #cbd5dc;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--ai-teal);
    box-shadow: 0 0 0 3px rgba(32,185,143,.15);
}
button, .btn {
    background: linear-gradient(90deg, #040b21, var(--ai-teal));
    color: white;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-top: 16px;
    font-weight: bold;
    font-size: 15px;
}
.full-btn {
    width: 100%;
}
button:hover, .btn:hover { opacity: .92; }
.secure-note {
    text-align: center;
    color: var(--ai-muted);
    margin-top: 22px;
}
.btn-secondary { background: #607d8b; }
.btn-danger { background: #a83232; }
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}
th, td {
    padding: 11px;
    border-bottom: 1px solid #e1e8ed;
    text-align: left;
}
th {
    background: var(--ai-blue);
    color: white;
}
tr:hover td { background: #f7fcfc; }
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.success { background: #d9f7ed; color: #145c3a; }
.error { background: #ffd9d9; color: #8a1f1f; }
.actions a { margin-right: 8px; }
.small { color: var(--ai-muted); font-size: 13px; }
.portal-footer {
    min-height: 40px;
    background: #040b21;
    color: #cbd5dc;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid rgba(32,185,143,.6);
}
