/* ====== FILE PATH: /opt/printhub/server/app/static/shared/dashboard.css ============ */

/* ============================================================
   LOGIN BACKGROUND
   ============================================================ */

body.login-page {
    min-height: 100vh;
    margin: 0;

    font-family: "Segoe UI", Arial, sans-serif;

    background-color: #246b8d;

    background-image:
        linear-gradient(
            rgba(15, 45, 75, 0.18),
            rgba(15, 45, 75, 0.18)
        ),
        url("../assets/printhub-login-background.png");

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;

    color: #1e293b;
}


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

.login-page-wrapper {
    min-height: 100vh;
    box-sizing: border-box;

    padding: 35px 20px 22px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* ============================================================
   COMPANY BRANDING
   ============================================================ */

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin-bottom: 28px;
}

.login-brand-image {
    display: block;

    width: 100%;
    max-width: 380px;
    max-height: 100px;

    height: auto;
    object-fit: contain;
}


/* PRINTHUB MANAGEMENT LABEL */

.login-product-label {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;
    margin-top: 14px;

    color: #ffffff;

    font-size: 13px;
    font-weight: 750;
    letter-spacing: 3px;

    text-align: center;
    text-transform: uppercase;

    text-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.login-product-line {
    display: block;

    width: 30px;
    height: 2px;

    flex-shrink: 0;

    border-radius: 2px;
    background: #ffffff;
}


/* ============================================================
   LOGIN CARD
   ============================================================ */

.login-page .login-card {
    width: 440px;
    max-width: 100%;

    box-sizing: border-box;
    padding: 36px;

    background: #ffffff;

    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 20px;

    box-shadow: 0 24px 65px rgba(0,0,0,0.25);
}


/* ============================================================
   CARD HEADING
   ============================================================ */

.login-card-heading {
    text-align: center;
    margin-bottom: 28px;
}


/* SECURITY ICON */

.login-icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 17px;

    border-radius: 16px;

    background: #eff6ff;
    color: #2563eb;
}

.login-icon svg {
    width: 32px;
    height: 32px;
}

.login-card-heading h2 {
    margin: 0;

    color: #0f172a;

    font-size: 25px;
    font-weight: 750;
}

.login-card-heading p {
    margin: 10px 0 0;

    color: #64748b;

    font-size: 13px;
    line-height: 1.6;
}


/* ============================================================
   LOGIN INPUT FIELDS
   ============================================================ */

.login-page .login-form-group {
    margin-bottom: 20px;
}

.login-page .login-form-group label {
    display: block;

    margin-bottom: 8px;

    color: #334155;

    font-size: 13px;
    font-weight: 700;
}

.login-page .login-form-group input {
    display: block;

    width: 100%;
    height: 48px;

    box-sizing: border-box;
    padding: 0 14px;

    border: 1px solid #cbd5e1;
    border-radius: 9px;

    outline: none;

    background: #eaf1fc;
    color: #0f172a;

    font-family: inherit;
    font-size: 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.login-page .login-form-group input::placeholder {
    color: #94a3b8;
}

.login-page .login-form-group input:hover {
    border-color: #94a3b8;
}

.login-page .login-form-group input:focus {
    border-color: #2563eb;

    background: #ffffff;

    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}


/* ============================================================
   SIGN IN BUTTON
   ============================================================ */

.login-page .login-btn {
    width: 100%;
    min-height: 49px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    margin-top: 8px;
    padding: 12px 18px;

    border: none;
    border-radius: 9px;

    background: linear-gradient(135deg, #2563eb, #1d4ed8);

    color: #ffffff;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 5px 14px rgba(37,99,235,0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.login-page .login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);

    box-shadow: 0 8px 20px rgba(37,99,235,0.3);

    transform: translateY(-1px);
}

.login-page .login-btn:active {
    transform: translateY(0);
}

.login-page .login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-page .login-btn:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

.login-page .login-btn span {
    font-size: 21px;
    line-height: 1;
}


/* ============================================================
   ERROR MESSAGE
   ============================================================ */

.login-page .error-msg {
    display: none;

    margin-top: 15px;
    padding: 11px 12px;

    border: 1px solid #fecaca;
    border-radius: 8px;

    background: #fef2f2;
    color: #b91c1c;

    font-size: 13px;
    line-height: 1.5;

    overflow-wrap: anywhere;
}

.login-page .error-msg:not(:empty) {
    display: block;
}


/* ============================================================
   SECURITY NOTE
   ============================================================ */

.login-security-note {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-top: 25px;
    padding-top: 18px;

    border-top: 1px solid #e2e8f0;

    color: #64748b;
    font-size: 12px;
}


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

.login-footer {
    margin-top: 25px;

    text-align: center;

    color: #ffffff;

    font-size: 12px;
    line-height: 1.6;

    text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.login-footer p {
    margin: 3px 0;
}

.login-footer p:first-child {
    font-weight: 700;
}


/* ============================================================
   RESPONSIVE MOBILE LAYOUT
   ============================================================ */

@media (max-width: 520px) {

    .login-page-wrapper {
        padding: 28px 16px 20px;
    }

    .login-brand {
        margin-bottom: 24px;
    }

    .login-brand-image {
        max-width: 310px;
        max-height: 80px;
    }

    .login-product-label {
        gap: 8px;

        margin-top: 11px;

        font-size: 11px;
        letter-spacing: 2px;
    }

    .login-product-line {
        width: 20px;
    }

    .login-page .login-card {
        padding: 27px 22px;
        border-radius: 16px;
    }

    .login-card-heading h2 {
        font-size: 22px;
    }
}


/* ============================================================
   SHORT SCREEN OPTIMIZATION
   ============================================================ */

@media (max-height: 650px) {

    .login-page-wrapper {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-brand {
        margin-bottom: 18px;
    }

    .login-page .login-card {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .login-card-heading {
        margin-bottom: 20px;
    }

    .login-icon {
        width: 45px;
        height: 45px;

        margin-bottom: 12px;
    }

    .login-icon svg {
        width: 26px;
        height: 26px;
    }

    .login-security-note {
        margin-top: 18px;
        padding-top: 13px;
    }

    .login-footer {
        margin-top: 15px;
    }
}



body {
    background: #f4f6f8;
    font-family: 'Segoe UI', sans-serif;
}

.stat-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.stat-card h6 {
    color: #6c757d;
    font-weight: 600;
}

.stat-card h2 {
    margin-top: 10px;
    font-weight: bold;
}


/* ===============================
   DEVICE FINGERPRINTS
================================ */

.fingerprint-cell{
    min-width:280px;
    max-width:320px;
    font-size:11px;
    font-family:monospace;
    word-break:break-all;
}

.fp-v1{
    padding-bottom:4px;
    margin-bottom:4px;
    border-bottom:1px solid #dee2e6;
}

.fp-v2{
    color:#0d6efd;
}

/* ===============================
   RATE MODAL (SUPERADMIN)
================================ */

.rate-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 520px;
    max-width: 95%;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    z-index: 2000;
}

.rate-modal h5 {
    margin-bottom: 15px;
    font-weight: 600;
}

.rate-modal .row {
    align-items: center;
}

.rate-modal input {
    text-align: right;
}

.rate-modal .btn {
    min-width: 100px;
}

.rate-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1500;
}


/* =========================================
   PRINTER GROUP COLORS (NEW)
========================================= */

.group-1 {
    background-color: #f8f9fa;
}

.group-2 {
    background-color: #e3f2fd;
}

.group-3 {
    background-color: #e8f5e9;
}

.group-4 {
    background-color: #fff3e0;
}

.group-5 {
    background-color: #fce4ec;
}

.group-6 {
    background-color: #ede7f6;
}

/* ===============================
   PRINTER TABLE IMPROVEMENT
================================ */

/* smooth hover effect */
#printerTable tr:hover {
    filter: brightness(95%);
    transition: 0.2s;
}

/* make group number bold and visible */
#printerTable td:nth-child(4) {
    font-weight: 600;
    color: #333;
}


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

.user-access-cell{
min-width:150px;
max-width:180px;
font-size:11px;
line-height:1.25;
white-space:normal;
word-break:break-word;
vertical-align:top;
}

.user-date-cell{
min-width:90px;
font-size:11px;
line-height:1.2;
white-space:normal;
}

.user-operation-cell{
white-space:nowrap;
min-width:230px;
}


/* ===============================
   MINI ACCOUNT
================================ */

.mini-account-table th,
.mini-account-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.mini-account-cr {
    color: #198754;
    font-weight: 700;
}

.mini-account-dr {
    color: #dc3545;
    font-weight: 700;
}

.mini-account-balance {
    font-size: 24px;
    font-weight: 700;
}


/* =========================================
   PRINT JOBS TABLE
========================================= */

#jobsTable td {
    vertical-align: middle;
}

#jobsTable .job-id-cell,
#jobsTable .job-device-id-cell,
#jobsTable .job-printer-id-cell {
    font-size: 12px;
}

#jobsTable tr:hover {
    filter: brightness(97%);
    transition: 0.2s;
}

#jobSearch {
    max-width: 450px;
}


/* ============================================================
   BYPASS REQUESTS – SUPERADMIN
   Shared Dashboard Styling
============================================================ */

/* ===============================
   BYPASS SEARCH
================================ */

#bypassSearch {
    width: 100%;
    max-width: 450px;
    min-height: 38px;
    padding: 8px 12px;

    border: 1px solid #cbd5e1;
    border-radius: 7px;

    background: #ffffff;
    color: #1e293b;

    font-size: 13px;
    outline: none;

    transition: border-color 0.2s, box-shadow 0.2s;
}

#bypassSearch:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}


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

#bypassTable td,
#bypassTable th {
    padding: 11px 12px;
    vertical-align: middle;
    font-size: 12px;
}

#bypassTable th {
    white-space: nowrap;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
}

#bypassTable td {
    color: #475569;
}

#bypassTable tr {
    transition: background-color 0.15s ease;
}

#bypassTable tr:hover {
    background-color: #f1f5f9;
}


/* ===============================
   PENDING REQUEST ROW
================================ */

#bypassTable tr.table-warning td {
    background-color: #fff8e7;
}

#bypassTable tr.table-warning:hover td {
    background-color: #fff1cc;
}


/* ===============================
   PRINT JOB ID
================================ */

#bypassTable .bypass-job-id-cell {
    min-width: 150px;
    max-width: 190px;

    font-family: monospace;
    font-size: 11px;

    overflow-wrap: anywhere;
    word-break: break-word;
}


/* ===============================
   DEVICE CODE
================================ */

#bypassTable .bypass-device-cell {
    min-width: 110px;
    white-space: nowrap;
    font-weight: 700;
    color: #334155;
}


/* ===============================
   REQUEST REASON
================================ */

#bypassTable .bypass-reason-cell {
    min-width: 150px;
    max-width: 230px;

    white-space: normal;
    overflow-wrap: anywhere;

    line-height: 1.5;
}


/* ===============================
   REQUESTED BY
================================ */

#bypassTable .bypass-requested-by-cell {
    min-width: 110px;
    white-space: normal;
    overflow-wrap: anywhere;
}


/* ===============================
   AMOUNT
================================ */

#bypassTable .bypass-amount-cell {
    min-width: 95px;
    white-space: nowrap;
    font-weight: 700;
    color: #0f172a;
}


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

#bypassTable .badge {
    display: inline-block;

    min-width: 78px;
    padding: 6px 9px;

    border-radius: 5px;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}


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

#bypassTable .bypass-action-btn {
    min-width: 65px;
    margin: 3px 2px;
    padding: 5px 9px;

    border-radius: 5px;

    font-size: 11px;
    font-weight: 600;
}

#bypassTable .bypass-actions-cell {
    min-width: 155px;
    white-space: nowrap;
}

#bypassTable .bypass-action-btn:hover {
    filter: brightness(92%);
}


/* ===============================
   DATE COLUMNS
================================ */

#bypassTable .bypass-date-cell {
    min-width: 125px;
    white-space: nowrap;
    font-size: 11px;
}


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

@media (max-width: 768px) {

    #bypassSearch {
        max-width: 100%;
    }

    #bypassTable td,
    #bypassTable th {
        padding: 9px 10px;
        font-size: 11px;
    }

    #bypassTable .bypass-actions-cell {
        min-width: 140px;
    }

}


/* ============================================================
   PROMOTION MANAGEMENT
   File: /opt/printhub/server/app/static/shared/dashboard.css
============================================================ */

#tab-promotions .stat-card {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.04);
    height: 100%;
}

#tab-promotions .stat-card h6 {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
}

#tab-promotions .stat-card h2 {
    font-size: 27px;
    font-weight: 700;
    margin: 0;
}

#tab-promotions .card {
    border: 1px solid #e5e7eb;
    border-radius: 9px;
}

#tab-promotions .card-header {
    font-weight: 600;
}

#tab-promotions .table {
    vertical-align: middle;
    font-size: 13px;
}

#tab-promotions .table th {
    white-space: nowrap;
}

#tab-promotions .table td {
    vertical-align: middle;
}

#tab-promotions .nav-pills {
    gap: 6px;
}

#tab-promotions .nav-pills .nav-link {
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#tab-promotions .form-label {
    font-size: 13px;
    font-weight: 600;
}

#tab-promotions input,
#tab-promotions select,
#tab-promotions textarea {
    font-size: 13px;
}

#tab-promotions .btn {
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 768px) {

    #tab-promotions .table {
        min-width: 850px;
    }

    #tab-promotions .stat-card h2 {
        font-size: 22px;
    }

    #tab-promotions .nav-pills {
        flex-wrap: wrap;
    }
}


