
/* ==========================================
   OPEN GATE TECHNOLOGIES HRMS
   Premium Navy & Gold Theme
========================================== */

:root {

    --nav: #172b42;
    --nav-dark: #102033;
    --nav-light: #243c56;

    --ink: #172b42;
    --muted: #607184;

    --gold: #b68532;
    --gold-light: #eedcaf;
    --gold-medium: #c79a49;
    --gold-dark: #99702c;
    --gold-soft: #f5ead1;

    --teal: #167469;
    --blue: #3f5c9c;

    --line: #e1e6ec;
    --paper: #f7f8fa;
    --bg: #f7f8fa;
    --white: #ffffff;

    --danger: #b42318;
    --success: #167469;

    --shadow: 0 4px 20px rgba(23, 43, 66, .06);
}


/* ==========================================
   GENERAL SETTINGS
========================================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui,
                 -apple-system, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -.8px;
    line-height: 1.3;
}

h2 {
    margin: 0 0 18px;
    font-size: 19px;
    font-weight: 700;
}

h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 650;
}

p {
    margin: 0 0 14px;
}

.muted {
    color: var(--muted);
}

.eyebrow {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.8px;
    color: var(--gold-dark);
}

.full-width {
    width: 100%;
    text-align: center;
}


/* ==========================================
   COMPANY LOGO & BRANDING
========================================== */

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: #ffffff;
}

.company-logo {
    display: block;
    width: 100%;
    max-width: 225px;
    max-height: 85px;
    height: auto;
    object-fit: contain;
}

.brand-caption {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.brand-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(
        145deg,
        var(--gold-light),
        var(--gold-medium),
        var(--gold-dark)
    );
    color: var(--nav);
    font-size: 19px;
    font-weight: 850;
}

.brand-name {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: .7px;
}

.brand-name span {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--gold-dark);
}


/* ==========================================
   LOGIN PAGE
========================================== */

.auth {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 30px;
    background:
        radial-gradient(
            circle at 5% 5%,
            #e2eeeb85,
            transparent 40%
        ),
        radial-gradient(
            circle at 95% 95%,
            #eddfc665,
            transparent 40%
        ),
        var(--paper);
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1100px;
    min-height: 640px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(23, 43, 66, .12);
}

.auth-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 55px;
    color: white;
    background: linear-gradient(
        145deg,
        var(--nav-dark),
        var(--nav),
        var(--nav-light)
    );
}

.auth-banner::before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -160px;
    top: -160px;
    border: 1px solid rgba(238, 220, 175, .25);
    border-radius: 50%;
    box-shadow:
        0 0 0 30px rgba(238, 220, 175, .03),
        0 0 0 60px rgba(238, 220, 175, .03);
    pointer-events: none;
}

.auth-banner-content {
    position: relative;
    z-index: 1;
}

.auth-banner .eyebrow {
    color: var(--gold-light);
    margin-bottom: 28px;
}

.auth-banner h1 {
    font-size: clamp(36px, 4vw, 54px);
    line-height: 1.15;
    letter-spacing: -1.8px;
    margin-bottom: 25px;
    color: white;
}

.auth-banner h1 span {
    color: var(--gold-light);
}

.auth-banner p {
    font-size: 15px;
    color: #ced9e4;
    max-width: 370px;
}

.auth-features {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.auth-features > div {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #e1e6ec;
}

.feature-check {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(238, 220, 175, .12);
    color: var(--gold-light);
    font-weight: 800;
}

.banner-footer {
    margin-top: 40px;
    font-size: 11px;
    color: #abbac9;
}

.auth-form-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
}

.auth-card {
    width: 100%;
    max-width: 390px;
}

.auth-card .brand {
    margin-bottom: 28px;
}

.auth-heading {
    margin-bottom: 24px;
}

.auth-heading h1 {
    font-size: 30px;
    color: var(--nav);
}

.auth label {
    margin: 16px 0;
}

.auth button {
    width: 100%;
    margin-top: 10px;
}

.auth input {
    min-height: 46px;
}

.auth .login-button {
    min-height: 47px;
    margin-top: 12px;
    font-size: 14px;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 70px;
}

.auth .password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 5px 8px;
    width: auto;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--gold-dark);
    font-size: 12px;
}

.login-help {
    margin-top: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.login-help a {
    color: var(--gold-dark);
    font-weight: 650;
}

.auth-footer {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    margin-top: 30px;
    line-height: 1.8;
}

.auth .panel {
    width: min(440px, 100%);
    padding: 32px;
}

.auth .standalone-auth {
    width: min(460px, 100%);
}

.standalone-auth .full-width {
    margin-top: 15px;
}


/* ==========================================
   MAIN APPLICATION LAYOUT
========================================== */

.shell {
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 23px 17px;
    background: linear-gradient(
        180deg,
        var(--nav),
        var(--nav-dark)
    );
    color: white;
}

.sidebar .brand {
    margin-bottom: 20px;
}

.sidebar .brand-logo {
    padding: 10px;
}

.sidebar .company-logo {
    max-width: 190px;
    max-height: 66px;
}

.sidebar .brand-caption {
    color: var(--gold-light);
    font-size: 8px;
}

.sidebar .brand-name {
    color: white;
}

.sidebar .brand-name span {
    color: var(--gold-light);
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, .12);
    margin: 0 0 25px;
}

.sidebar small,
.menu-heading {
    padding: 0 10px;
    color: #cfb177;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 1.5px;
}

.nav {
    display: grid;
    gap: 7px;
    margin: 12px 0 28px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 11px 13px;
    color: #d4deea;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 550;
    transition:
        background .18s,
        color .18s;
}

.nav a:hover {
    background: rgba(255, 255, 255, .07);
    color: white;
    text-decoration: none;
}

.nav a.active {
    color: #172b42;
    font-weight: 750;
    background: linear-gradient(
        120deg,
        #eedcaf,
        #c79a49
    );
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 23px;
    flex-shrink: 0;
    font-size: 19px;
    line-height: 1;
}

.nav a:not(.active) .nav-icon {
    color: var(--gold-light);
}

.logout-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: rgba(255, 255, 255, .06);
    color: #e1e6ec;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: none;
    text-align: left;
}

.logout-button:hover {
    background: rgba(255, 255, 255, .12);
    color: white;
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 8px 5px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user strong {
    display: block;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.sidebar-user span {
    display: block;
    color: #a8b8c8;
    font-size: 11px;
}

.sidebar-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--gold-soft);
    color: var(--nav);
    font-weight: 800;
}

.sidebar-version {
    margin-top: 18px;
    color: #91a3b5;
    font-size: 10px;
}

.main {
    min-width: 0;
}


/* ==========================================
   TOP HEADER
========================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 28px;
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(23, 43, 66, .03);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title {
    font-size: 15px;
    font-weight: 750;
    color: var(--nav);
}

.topbar-subtitle {
    font-size: 11px;
}

.topbar .user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-date {
    margin-right: 10px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.header-user {
    font-size: 12px;
}

.header-user .muted {
    font-size: 11px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gold-soft);
    border: 1px solid #e5c993;
    color: var(--nav);
    font-weight: 800;
}

.mobile-menu-toggle {
    display: none;
}

.content {
    max-width: 1500px;
    margin: auto;
    padding: 28px;
}

.breadcrumb {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 12px;
}

.breadcrumb span {
    padding: 0 7px;
    color: var(--gold);
}


/* ==========================================
   DASHBOARD & CARDS
========================================== */

.hero {
    position: relative;
    overflow: hidden;
    padding: 30px;
    margin-top: 24px;
    background: linear-gradient(
        120deg,
        var(--nav),
        var(--nav-light)
    );
    border-radius: 15px;
    border-left: 5px solid var(--gold-medium);
    color: white;
    box-shadow: var(--shadow);
}

.hero h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: white;
}

.hero p {
    color: #d3dee9;
}

.hero .secondary {
    margin-top: 8px;
    background: var(--gold-soft);
    color: var(--nav);
}

.metrics {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(185px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.metric {
    padding: 23px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--gold);
    border-radius: 13px;
    background: white;
    box-shadow: var(--shadow);
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.metric:nth-child(2n) {
    border-top-color: var(--teal);
}

.metric:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(23, 43, 66, .09);
}

.metric .muted {
    font-size: 12px;
    font-weight: 600;
}

.metric strong {
    display: block;
    margin-top: 9px;
    font-size: 30px;
    font-weight: 800;
    color: var(--nav);
    overflow-wrap: anywhere;
}

.panel {
    margin: 20px 0;
    padding: 25px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: var(--shadow);
}

.grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(175px, 1fr));
    gap: 18px;
    align-items: end;
}

.grid .wide {
    grid-column: 1 / -1;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}


/* ==========================================
   FORMS & INPUTS
========================================== */

label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    color: #394b5f;
}

input,
select,
textarea {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid #d2dbe5;
    border-radius: 8px;
    background: white;
    color: var(--ink);
    font: inherit;
    transition:
        border-color .18s,
        box-shadow .18s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(182, 133, 50, .13);
}

input::placeholder,
textarea::placeholder {
    color: #929eaa;
    font-weight: 400;
}

input[type="checkbox"] {
    display: inline-block;
    width: auto;
    margin-right: 7px;
    accent-color: var(--gold);
}

textarea {
    resize: vertical;
}

.inline-filter {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.inline-filter label {
    min-width: 160px;
}


/* ==========================================
   BUTTONS
========================================== */

button,
.btn {
    display: inline-block;
    padding: 11px 18px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(
        120deg,
        var(--gold-light),
        var(--gold-medium)
    );
    color: var(--nav);
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.5;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition:
        filter .18s,
        box-shadow .18s;
}

button:hover,
.btn:hover {
    filter: brightness(.96);
    box-shadow: 0 3px 12px rgba(23, 43, 66, .09);
    text-decoration: none;
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible {
    outline: 3px solid var(--gold-medium);
    outline-offset: 3px;
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.secondary {
    background: #edf1f5;
    border: 1px solid var(--line);
    color: var(--nav);
}

.danger {
    background: #b42318;
    color: white;
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}


/* ==========================================
   TABLES
========================================== */

.tablewrap {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

thead {
    background: var(--nav);
    color: white;
}

th {
    padding: 14px 13px;
    color: white;
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    border-bottom: 2px solid var(--gold);
}

td {
    padding: 14px 13px;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
}

tbody tr:nth-child(even) {
    background: #fafbfc;
}

tbody tr:hover {
    background: #f8f4ea;
}

td form {
    min-width: 150px;
}

table td button {
    padding: 7px 11px;
    font-size: 11px;
}

.amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pager {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}


/* ==========================================
   STATUS LABELS
========================================== */

.tag {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 30px;
    background: #edf1f5;
    color: var(--nav);
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.tag.approved,
.tag.published,
.tag.active,
.tag.present {
    background: #e3f3ed;
    color: #166651;
}

.tag.rejected,
.tag.inactive,
.tag.absent {
    background: #fce8e6;
    color: #9b3030;
}

.tag.pending,
.tag.draft,
.tag.late {
    background: #f5ead1;
    color: #76531d;
}


/* ==========================================
   SUCCESS & ERROR MESSAGES
========================================== */

.notice {
    margin: 16px 0;
    padding: 14px 16px;
    background: #eaf6f1;
    color: #176354;
    border: 1px solid #b7ddcd;
    border-left: 4px solid var(--teal);
    border-radius: 9px;
    font-size: 13px;
}

.error {
    background: #fff1ef;
    border-color: #edb5b2;
    border-left-color: var(--danger);
    color: #982c24;
}

.notice ul {
    margin: 0;
    padding-left: 20px;
}

details summary {
    cursor: pointer;
    color: var(--blue);
    font-weight: 650;
}

details form {
    margin-top: 12px;
}


/* ==========================================
   SALARY SLIP
========================================== */

.slip {
    max-width: 900px;
    margin: 25px auto;
    padding: 35px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: var(--shadow);
}

.slip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px;
}

.slip-header .brand {
    width: 240px;
    margin: 0;
}

.slip-heading {
    text-align: right;
}

.slip-heading h1 {
    font-size: 24px;
}

.slip-divider {
    height: 3px;
    margin: 25px 0;
    background: linear-gradient(
        90deg,
        var(--gold-dark),
        var(--gold-light),
        var(--gold-dark)
    );
}

.employee-summary {
    margin: 25px 0;
    padding: 20px;
    background: var(--paper);
    border-radius: 10px;
}

.employee-summary .muted {
    font-size: 12px;
}

.salary-total {
    font-weight: 750;
    color: var(--nav);
}

.net-salary {
    margin-top: 25px;
    padding: 23px;
    border-radius: 10px;
    background: var(--nav);
    border-left: 5px solid var(--gold);
    color: white;
}

.net-salary span {
    display: block;
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 1.5px;
}

.net-salary strong {
    display: block;
    margin-top: 8px;
    font-size: 29px;
}

.slip-footer {
    margin-top: 30px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}


/* ==========================================
   FOOTER
========================================== */

.foot {
    margin: 25px 0;
    color: var(--muted);
    font-size: 12px;
}

.workspace-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}


/* ==========================================
   MOBILE RESPONSIVE DESIGN
========================================== */

@media (max-width: 900px) {

    .auth {
        padding: 20px;
    }

    .auth-wrapper {
        max-width: 550px;
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-banner {
        display: none;
    }

    .auth-form-area {
        padding: 35px;
    }

    .shell {
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        display: none;
        position: static;
        height: auto;
        width: 100%;
        order: 1;
    }

    .sidebar.mobile-open {
        display: flex;
    }

    .main {
        display: contents;
    }

    .topbar {
        order: 0;
        position: sticky;
        top: 0;
        padding: 14px 18px;
    }

    .content {
        order: 2;
        width: 100%;
        padding: 20px;
    }

    .mobile-menu-toggle {
        display: inline-block;
        padding: 7px 11px;
        font-size: 18px;
    }

    .sidebar .brand-logo {
        max-width: 250px;
    }

    .sidebar .nav {
        margin-bottom: 18px;
    }

    .header-date {
        display: none;
    }

    .metrics {
        grid-template-columns:
            repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .metric {
        padding: 18px;
    }

}

@media (max-width: 480px) {

    .auth {
        padding: 12px;
    }

    .auth-form-area {
        padding: 25px;
    }

    .auth .panel {
        padding: 24px;
    }

    .auth-wrapper {
        border-radius: 15px;
    }

    .auth-heading h1 {
        font-size: 26px;
    }

    h1 {
        font-size: 25px;
    }

    .topbar-title {
        font-size: 12px;
    }

    .topbar-subtitle {
        font-size: 10px;
    }

    .header-user {
        display: none;
    }

    .content {
        padding: 15px;
    }

    .hero {
        padding: 23px;
    }

    .hero h2 {
        font-size: 21px;
    }

    .panel {
        padding: 17px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .metric strong {
        font-size: 25px;
    }

    .slip {
        padding: 18px;
    }

    .slip-heading {
        text-align: left;
    }

}

@media (prefers-reduced-motion: reduce) {

    * {
        transition: none !important;
        animation: none !important;
    }

}


/* ==========================================
   PRINT & PDF SETTINGS
========================================== */

@media print {

    .hide-print,
    .sidebar,
    .topbar,
    .breadcrumb,
    .workspace-footer,
    .notice {
        display: none !important;
    }

    .shell,
    .main {
        display: block;
    }

    .content {
        padding: 0;
        max-width: none;
    }

    .slip {
        margin: 0;
        padding: 15px;
        max-width: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    body {
        background: white;
    }

    th {
        background: #eeeeee;
        color: #172b42;
    }

    .net-salary {
        background: white;
        color: var(--nav);
        border: 1px solid var(--gold);
    }

    .net-salary span {
        color: var(--nav);
    }

    tr,
    .net-salary,
    .employee-summary {
        break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

}
