
/* ==================================================
   HADENA INTEGRATED MANAGEMENT SYSTEM
   DASHBOARD MASTER STYLESHEET
   GLOBAL TYPOGRAPHY INTEGRATION
   GLOBAL BUTTON STANDARD
================================================== */

:root {
    --navy: #14243A;
    --navy-light: #203954;
    --gold: #C6A15B;
    --gold-light: #F8F1E5;
    --background: #F3F5F9;
    --white: #FFFFFF;
    --text: #27364A;
    --muted: #8792A2;
    --border: #E8ECF2;
    --green: #16845B;
    --red: #C74747;
    --sidebar-width: 260px;

    /* GLOBAL BUTTON VARIABLES */
    --button-bg: #14243A;
    --button-hover: #203954;
    --button-active: #0D1929;
    --button-text: #FFFFFF;
    --button-height: 40px;
    --button-radius: 8px;
}

* {
    box-sizing: border-box;
}

/* ==================================================
   BODY
================================================== */

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: var(--font-primary);
    font-size: var(--font-body);
    font-weight: var(--weight-normal);
    line-height: var(--line-body);
}

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

.app-layout {
    min-height: 100vh;
}

.main-content {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding: 30px 34px;
    transition: margin-left .25s ease;
}

/* ==================================================
   TOPBAR
================================================== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 22px 26px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(20,36,58,.035);
}

.page-title h1 {
    margin: 0 0 7px;
    color: var(--navy);
    font-family: var(--font-heading);
    font-size: var(--font-page-title);
    font-weight: var(--weight-extrabold);
    line-height: var(--line-page-title);
}

.page-title p {
    margin: 0;
    color: var(--muted);
    font-family: var(--font-primary);
    font-size: var(--font-description);
    font-weight: var(--weight-normal);
    line-height: var(--line-description);
}

/* ==================================================
   REALTIME CLOCK
================================================== */

.dashboard-clock {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.clock-time {
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: var(--font-card-title);
    font-weight: var(--weight-extrabold);
    line-height: var(--line-card-title);
    letter-spacing: 1.5px;
    font-variant-numeric: tabular-nums;
}

.clock-date {
    color: var(--muted);
    font-family: var(--font-primary);
    font-size: var(--font-small);
    font-weight: var(--weight-semibold);
    line-height: var(--line-small);
}

/* ==================================================
   USER AREA
================================================== */

.user-area {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--gold-light);
    color: var(--navy);
    font-family: var(--font-primary);
    font-size: var(--font-label);
    font-weight: var(--weight-extrabold);
}

.user-info {
    text-align: left;
}

.user-info strong {
    display: block;
    color: var(--navy);
    font-family: var(--font-primary);
    font-size: var(--font-label);
    font-weight: var(--weight-bold);
    line-height: var(--line-label);
}

.user-info span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-family: var(--font-primary);
    font-size: var(--font-small);
    font-weight: var(--weight-normal);
    line-height: var(--line-small);
}

.logout-link {
    padding-left: 10px;
    border-left: 1px solid var(--border);
    color: var(--red);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font-primary);
    font-size: var(--font-button);
    font-weight: var(--weight-bold);
    line-height: var(--line-button);
}

.logout-link:hover {
    color: #A92F2F;
}

/* ==================================================
   WELCOME BANNER
================================================== */

.welcome-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 29px 32px;
    margin-bottom: 25px;
    border-radius: 15px;
    background: linear-gradient(115deg, var(--navy), var(--navy-light));
    color: white;
    box-shadow: 0 8px 22px rgba(20,36,58,.12);
}

.welcome-banner::after {
    content: "";
    position: absolute;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(198,161,91,.22);
    border-radius: 50%;
    right: 60px;
    top: -150px;
    pointer-events: none;
}

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

.welcome-content span {
    color: var(--gold);
    font-family: var(--font-primary);
    font-size: var(--font-small);
    font-weight: var(--weight-extrabold);
    line-height: var(--line-small);
    letter-spacing: 2px;
}

.welcome-content h2 {
    margin: 10px 0 8px;
    color: white;
    font-family: var(--font-heading);
    font-size: var(--font-section-title);
    font-weight: var(--weight-bold);
    line-height: var(--line-section-title);
}

.welcome-content p {
    margin: 0;
    color: #D0D9E4;
    font-family: var(--font-primary);
    font-size: var(--font-description);
    font-weight: var(--weight-normal);
    line-height: var(--line-description);
}

.welcome-decoration {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    padding-right: 12px;
}

/* ==================================================
   STATISTICS
================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 27px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 21px 19px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: 0 4px 14px rgba(20,36,58,.035);
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(20,36,58,.08);
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 17px;
}

.stat-label {
    color: var(--muted);
    font-family: var(--font-heading);
    font-size: var(--font-card-title);
    font-weight: var(--weight-bold);
    line-height: var(--line-card-title);
    text-transform: var(--card-title-transform);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--gold-light);
    color: #9B7438;
}

.stat-card h2 {
    margin: 0;
    color: var(--navy);
    font-family: var(--font-heading);
    font-size: var(--font-card-number);
    font-weight: var(--weight-extrabold);
    line-height: var(--line-card-number);
}

.stat-card small {
    display: block;
    margin-top: 6px;
    color: #8792A2;
    font-family: var(--font-primary);
    font-size: var(--font-card-description);
    font-weight: var(--weight-normal);
    line-height: var(--line-card-description);
}

.stat-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gold);
}

.stat-card.process .stat-icon {
    background: #FFF5E5;
    color: #B17A27;
}

.stat-card.sent .stat-icon {
    background: #EAF2FC;
    color: #3974B8;
}

.stat-card.deal .stat-icon {
    background: #E8F6EF;
    color: var(--green);
}

.stat-card.clients .stat-icon {
    background: #F0EDFA;
    color: #7960A8;
}

/* ==================================================
   CONTENT PANEL
================================================== */

.content-panel {
    padding: 25px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(20,36,58,.035);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.panel-heading h3 {
    margin: 0 0 6px;
    color: var(--navy);
    font-family: var(--font-heading);
    font-size: var(--font-section-title);
    font-weight: var(--weight-bold);
    line-height: var(--line-section-title);
}

.panel-heading p {
    margin: 0;
    color: var(--muted);
    font-family: var(--font-primary);
    font-size: var(--font-description);
    font-weight: var(--weight-normal);
    line-height: var(--line-description);
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--navy);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font-primary);
    font-size: var(--font-button);
    font-weight: var(--weight-bold);
    line-height: var(--line-button);
    transition: .2s;
}

.view-all:hover {
    background: var(--gold-light);
    border-color: var(--gold);
}

/* ==================================================
   TABLE
================================================== */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

thead th {
    padding: 13px;
    background: #F7F8FA;
    color: #738094;
    font-family: var(--font-heading);
    font-size: var(--font-table-header);
    font-weight: var(--weight-bold);
    line-height: var(--line-table-header);
    text-align: left;
    letter-spacing: .4px;
    white-space: nowrap;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 14px 13px;
    color: #455468;
    font-family: var(--font-primary);
    font-size: var(--font-table);
    font-weight: var(--weight-normal);
    line-height: var(--line-table);
    border-bottom: 1px solid #EEF1F5;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #FCFCFD;
}

.request-number {
    color: var(--navy);
    font-weight: var(--weight-bold);
    white-space: nowrap;
}

.company-name {
    color: var(--navy);
    font-weight: var(--weight-bold);
}

.participant-count {
    white-space: nowrap;
}

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

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 20px;
    background: #F1F3F6;
    color: #64748B;
    font-family: var(--font-primary);
    font-size: var(--font-badge);
    font-weight: var(--weight-bold);
    line-height: var(--line-small);
    white-space: nowrap;
}

.status-badge.review {
    background: #FFF4DF;
    color: #A66B16;
}

.status-badge.waiting {
    background: #F0EDFA;
    color: #7256A4;
}

.status-badge.processing {
    background: #EAF2FC;
    color: #3974B8;
}

.status-badge.sent {
    background: #E8F6EF;
    color: var(--green);
}

/* ==================================================
   DETAIL BUTTON
================================================== */

.detail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--navy);
    color: white;
    border-radius: 7px;
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: var(--font-button);
    font-weight: var(--weight-bold);
    line-height: var(--line-button);
    transition: .2s;
}

.detail-button:hover {
    background: var(--gold);
    color: var(--navy);
}

/* ==================================================
   EMPTY STATE
================================================== */

.empty-state {
    padding: 40px 20px !important;
    color: var(--muted);
    text-align: center;
    font-family: var(--font-primary);
    font-size: var(--font-description);
    font-weight: var(--weight-normal);
    line-height: var(--line-description);
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

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

.page-footer {
    padding: 22px 10px 8px;
    margin-top: 5px;
    color: #8792A2;
    text-align: center;
    font-family: var(--font-primary);
    font-size: var(--font-small);
    font-weight: var(--weight-bold);
    line-height: var(--line-small);
    letter-spacing: 1px;
}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 1150px) {

    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .main-content {
        padding: 25px;
    }
}

@media (max-width: 900px) {

    :root {
        --sidebar-width: 215px;
    }

    .main-content {
        padding: 20px;
    }

    .topbar {
        align-items: flex-start;
    }
}

@media (max-width: 760px) {

    .main-content {
        margin-left: 0;
        min-height: auto;
        padding: 20px;
    }
}

@media (max-width: 650px) {

    .main-content {
        padding: 15px 12px 25px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        gap: 17px;
        margin-bottom: 16px;
    }

    .user-area {
        justify-content: flex-start;
        padding: 9px 14px;
        border: 1px solid var(--border);
    }

    .user-info {
        text-align: left;
    }

    .welcome-banner {
        padding: 23px 20px;
        margin-bottom: 16px;
    }

    .welcome-decoration {
        padding: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 17px;
    }

    .stat-card {
        padding: 16px 14px;
    }

    .stat-top {
        margin-bottom: 12px;
    }

    .content-panel {
        padding: 18px 14px;
    }

    .panel-header {
        align-items: flex-start;
    }

    .view-all {
        padding: 8px 10px;
    }

    .page-footer {
        padding: 20px 10px 5px;
    }
}

@media (max-width: 380px) {

    .welcome-decoration {
        display: none;
    }

    .panel-header {
        flex-direction: column;
    }
}

/* ==================================================
   GLOBAL BUTTON STANDARD
   ALL PAGES - HADENA HIMS
================================================== */

/*
   Target:
   - Native HTML buttons
   - Input button / submit / reset
   - .btn and .button
   - Common custom button classes
   - Dashboard view-all and detail-button
*/

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn,
.button,
[class^="btn-"],
[class*=" btn-"],
[class$="-btn"],
[class$="-button"],
.view-all,
.detail-button {

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;

    height: var(--button-height) !important;
    min-height: var(--button-height) !important;

    width: auto;

    padding: 0 16px !important;

    background: var(--button-bg) !important;
    border: 1px solid var(--button-bg) !important;
    border-radius: var(--button-radius) !important;

    color: var(--button-text) !important;

    font-family: var(--font-primary) !important;
    font-size: var(--font-button) !important;
    font-weight: var(--weight-bold) !important;
    line-height: 1 !important;

    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    box-shadow: none !important;

    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        transform .12s ease,
        box-shadow .18s ease !important;
}

/* HOVER */

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
.btn:hover,
.button:hover,
[class^="btn-"]:hover,
[class*=" btn-"]:hover,
[class$="-btn"]:hover,
[class$="-button"]:hover,
.view-all:hover,
.detail-button:hover {

    background: var(--button-hover) !important;
    border-color: var(--button-hover) !important;
    color: var(--button-text) !important;

    box-shadow: 0 3px 9px rgba(20,36,58,.16) !important;
}

/* ACTIVE / PRESSED */

button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active,
.btn:active,
.button:active,
[class^="btn-"]:active,
[class*=" btn-"]:active,
[class$="-btn"]:active,
[class$="-button"]:active,
.view-all:active,
.detail-button:active {

    background: var(--button-active) !important;
    border-color: var(--button-active) !important;

    transform: translateY(1px) scale(.98) !important;

    box-shadow: inset 0 2px 4px rgba(0,0,0,.18) !important;
}

/* KEYBOARD FOCUS */

button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible,
.btn:focus-visible,
.button:focus-visible,
[class^="btn-"]:focus-visible,
[class*=" btn-"]:focus-visible,
[class$="-btn"]:focus-visible,
[class$="-button"]:focus-visible,
.view-all:focus-visible,
.detail-button:focus-visible {

    outline: 3px solid rgba(198,161,91,.45) !important;
    outline-offset: 2px;
}

/* DISABLED */

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled,
.btn:disabled,
.button:disabled,
[class^="btn-"]:disabled,
[class*=" btn-"]:disabled,
[class$="-btn"]:disabled,
[class$="-button"]:disabled,
[aria-disabled="true"] {

    opacity: .5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ICON INSIDE BUTTON */

button svg,
.btn svg,
.button svg,
[class^="btn-"] svg,
[class*=" btn-"] svg,
[class$="-btn"] svg,
[class$="-button"] svg,
.view-all svg,
.detail-button svg {

    flex-shrink: 0;
}

/* SMALL SCREEN BUTTON SAFETY */

@media (max-width: 650px) {

    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .btn,
    .button,
    [class^="btn-"],
    [class*=" btn-"],
    [class$="-btn"],
    [class$="-button"],
    .view-all,
    .detail-button {

        max-width: 100%;
    }
}
