/* =========================================================
   ENISAVE PORTAL - CLEAN MASTER CSS (STABLE BUILD)
========================================================= */

/* =========================
   RESET
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =========================
   BODY
========================= */
body {
    font-family: "Segoe UI", Calibri, Arial, sans-serif;
    background: #f4f6f8;
    color: #1a1a1a;
    line-height: 1.5;
}

/* =========================
   LAYOUT CONTAINER
========================= */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* =========================
   HEADER
========================= */
.header {
    background: #1f3c73;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-box {
    background: #fff;
    padding: 6px 10px;
    border-radius: 4px;
}

.logo-box img {
    height: 50px;
}

.header-title {
    display: flex;
    flex-direction: column;
}

.company-name {
    font-size: 18px;
    font-weight: 600;
}

.portal-name {
    font-size: 12px;
    opacity: 0.8;
}

.header-right {
    font-size: 13px;
}

/* =========================
   NAVBAR
========================= */
.navbar {
    background: #2f5597;
    padding: 10px 20px;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    margin-right: 18px;
    font-size: 14px;
}

.navbar a.active {
    font-weight: bold;
    text-decoration: underline;
}

/* =========================
   CARD
========================= */
.card {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* =========================
   TEXT
========================= */
.subtext {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

/* =========================
   FORM GRID
========================= */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
    margin-top: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: span 2;
}

/* =========================
   INPUTS
========================= */
input,
select,
textarea {
    width: 100%;
    height: 40px;
    padding: 10px;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    font-size: 14px;
}

textarea {
    height: auto;
    min-height: 100px;
}

/* =========================
   BUTTONS
========================= */
button,
.btn-primary {
    width: 100%;
    height: 42px;
    background: #2f5597;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

button:hover,
.btn-primary:hover {
    background: #24447a;
}

/* =========================
   TABLE
========================= */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    background: #f1f4f8;
    padding: 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: #555;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.table tr:hover {
    background: #f9fbfd;
}

/* =========================
   BADGES
========================= */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.success {
    background: #e6f4ea;
    color: #1e7e34;
}

.badge.warning {
    background: #fff3cd;
    color: #856404;
}

/* =========================
   FOOTER
========================= */
.footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #666;
}

/* =========================================================
   LOGIN PAGE (ISOLATED)
========================================================= */
/* LOGIN FIXED CENTER */
.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
}

.login-wrapper .card {
    width: 360px;
    max-width: 100%;
    margin: 0 auto;
}

/* LOGO */
.login-logo {
    text-align: center;
    margin-bottom: 15px;
}

.login-logo img {
    height: 60px;
    object-fit: contain;
}

.login-wrapper input {
    background: #fff;
}

.login-logo img {
    height: 60px;
    display: block;
    margin: 0 auto;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 768px) {

    .form-grid {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .navbar {
        padding: 10px;
    }
    
    /* =========================
   DASHBOARD (CLIENT ONLY)
========================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 22px;
    border: 1px solid #e1e5ea;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* HEADER LINE INSIDE CARD */
.dashboard-card h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1f3c73;
}

/* KPI STYLE */
.kpi {
    font-size: 28px;
    font-weight: 600;
    color: #2f5597;
    margin-top: 5px;
}

/* SMALL TEXT */
.meta {
    font-size: 13px;
    color: #666;
}

/* BUTTON ALIGNMENT */
.dashboard-card .btn {
    display: inline-block;
    margin-top: 12px;
    width: auto;
    padding: 8px 14px;
}

/* MOBILE */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
}