/* assets/css/style.css */

:root {
    --primary: #0077d9;
    --primary-dark: #073763;
    --navy: #062b4f;
    --soft-bg: #f4f8fb;
    --white: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--soft-bg);
    color: var(--text);
}

/* =========================
   Login Page
========================= */

.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(0, 119, 217, 0.25), transparent 35%),
        linear-gradient(135deg, #061d35, #0077d9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 430px;
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
}

.login-brand {
    text-align: center;
    margin-bottom: 26px;
}

.brand-icon {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: linear-gradient(135deg, #0077d9, #00b4ff);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 14px;
    box-shadow: 0 14px 30px rgba(0, 119, 217, 0.35);
}

.login-brand h2 {
    margin: 0;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 1px;
}

.login-brand p {
    margin: 4px 0 0;
    color: var(--muted);
}

.premium-input .input-group-text {
    background: #f8fafc;
    border-right: 0;
    color: var(--primary);
}

.premium-input .form-control {
    border-left: 0;
    min-height: 48px;
}

.premium-input .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.login-btn {
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #0077d9, #005db2);
    box-shadow: 0 12px 24px rgba(0, 119, 217, 0.30);
}

.login-footer-text {
    text-align: center;
    margin-top: 22px;
    color: var(--muted);
}

.login-footer-text a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
}

.demo-login-box {
    margin-top: 18px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 12px;
    font-size: 13px;
    color: #334155;
}

/* =========================
   App Layout
========================= */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0077d9 0%, #1f5fa7 45%, #f4a5b1 100%);
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.16);
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-brand {
    min-height: 120px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.30);
}

.brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(8px);
}

.sidebar-brand h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
}

.sidebar-brand span {
    font-size: 13px;
    opacity: 0.90;
}

.sidebar-menu {
    padding: 18px 12px 28px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.menu-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.70);
    margin: 16px 12px 8px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 4px 0;
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.22s ease;
}

.menu-link i {
    width: 22px;
    text-align: center;
}

.menu-link:hover,
.menu-link.active {
    background: rgba(255,255,255,0.22);
    transform: translateX(5px);
    color: #fff;
}

.logout-link {
    margin-top: 18px;
    background: rgba(255, 255, 255, 0.15);
}

/* =========================
   Main Content
========================= */

.main-content {
    margin-left: 270px;
    width: calc(100% - 270px);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.topbar {
    height: 48px;
    background: #0077d9;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 18px;
    box-shadow: 0 4px 18px rgba(0, 119, 217, 0.25);
    position: sticky;
    top: 0;
    z-index: 900;
}

.menu-toggle {
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 18px;
}

.topbar h4 {
    margin: 0;
    font-weight: 800;
    font-size: 18px;
}

.topbar span {
    font-size: 13px;
    opacity: 0.90;
}

.topbar-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-user small {
    display: block;
    font-size: 12px;
    opacity: 0.85;
}

.page-content {
    padding: 28px;
}

/* =========================
   Dashboard
========================= */

.welcome-card {
    background: linear-gradient(135deg, #073763, #0077d9);
    color: #fff;
    padding: 28px;
    border-radius: 26px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    overflow: hidden;
    position: relative;
}

.welcome-card::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.10);
    right: -80px;
    top: -100px;
}

.welcome-card h2 {
    font-weight: 900;
    margin: 0 0 6px;
}

.welcome-card p {
    margin: 0;
    opacity: 0.90;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 22px;
}

.stat-card {
    background: #fff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.22s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.stat-card h3 {
    margin: 0;
    font-weight: 900;
    font-size: 30px;
}

.stat-card p {
    margin: 2px 0 0;
    color: var(--muted);
    font-weight: 600;
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 23px;
}

.stat-icon.blue { background: linear-gradient(135deg, #0077d9, #00b4ff); }
.stat-icon.orange { background: linear-gradient(135deg, #f97316, #fb923c); }
.stat-icon.purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.stat-icon.green { background: linear-gradient(135deg, #16a34a, #4ade80); }
.stat-icon.cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.stat-icon.red { background: linear-gradient(135deg, #dc2626, #fb7185); }
.stat-icon.dark { background: linear-gradient(135deg, #0f172a, #475569); }
.stat-icon.yellow { background: linear-gradient(135deg, #eab308, #facc15); }

.premium-panel {
    background: #fff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.85);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-header h5 {
    margin: 0;
    font-weight: 900;
}

.panel-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.premium-table thead th {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: .5px;
    border-bottom: 1px solid #e2e8f0;
}

.premium-table td {
    padding: 14px 10px;
    border-color: #f1f5f9;
}

.status-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #e0f2fe;
    color: #0369a1;
}

.quick-actions {
    display: grid;
    gap: 12px;
}

.quick-actions a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.22s ease;
}

.quick-actions a:hover {
    background: #e0f2fe;
    color: #075985;
    transform: translateX(5px);
}

.quick-actions i {
    color: var(--primary);
    font-size: 20px;
}

/* =========================
   Sidebar Collapse
========================= */

.sidebar-collapsed .sidebar {
    width: 86px;
}

.sidebar-collapsed .sidebar-brand div:last-child,
.sidebar-collapsed .menu-label,
.sidebar-collapsed .menu-link span {
    display: none;
}

.sidebar-collapsed .main-content {
    margin-left: 86px;
    width: calc(100% - 86px);
}

.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}

/* =========================
   Responsive
========================= */

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-collapsed .sidebar {
        width: 270px;
        transform: translateX(0);
    }

    .sidebar-collapsed .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-collapsed .sidebar-brand div:last-child,
    .sidebar-collapsed .menu-label,
    .sidebar-collapsed .menu-link span {
        display: block;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .welcome-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
}

@media (max-width: 576px) {
    .page-content {
        padding: 18px;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar h4 {
        font-size: 15px;
    }

    .topbar-user {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 24px;
        border-radius: 22px;
    }
}

/* =========================
   Master Pages Extra Styling
========================= */

.premium-alert {
    border: 0;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    font-weight: 600;
}

.premium-textarea,
.premium-select {
    border-radius: 14px;
    border: 1px solid #dbe3ef;
    min-height: 46px;
}

.premium-textarea:focus,
.premium-select:focus {
    box-shadow: 0 0 0 4px rgba(0, 119, 217, 0.10);
    border-color: var(--primary);
}

.premium-btn {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    background: linear-gradient(135deg, #0077d9, #005db2);
    box-shadow: 0 12px 24px rgba(0, 119, 217, 0.22);
}

.mini-count {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 800;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 999px;
}

.table-title-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-title-icon span {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #e0f2fe;
    color: #0077d9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-pill {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status-pill.active {
    background: #dcfce7;
    color: #15803d;
}

.status-pill.inactive {
    background: #fee2e2;
    color: #b91c1c;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   Product Master Styling
========================= */

.product-preview-img {
    width: 90px;
    height: 90px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    padding: 4px;
    background: #fff;
}

.product-table-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #e0f2fe;
    color: #0077d9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model-chip {
    display: inline-flex;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* =========================
   Engineer / User Master Styling
========================= */

.status-pill.blocked {
    background: #fef3c7;
    color: #92400e;
}

/* =========================
   Register Page
========================= */

.register-wrapper {
    width: 100%;
    max-width: 780px;
}

.register-card {
    max-height: 92vh;
    overflow-y: auto;
}

/* =========================
   Modal Styling
========================= */

.premium-modal {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
}

.premium-modal .modal-header {
    background: #0077d9;
    color: #fff;
    border: 0;
}

.premium-modal .btn-close {
    filter: invert(1);
}

/* =========================
   Ticket View Styling
========================= */

.ticket-hero {
    background: linear-gradient(135deg, #073763, #0077d9);
    color: #fff;
    padding: 26px;
    border-radius: 26px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.ticket-hero h2 {
    margin: 0;
    font-weight: 900;
}

.ticket-hero p {
    margin: 5px 0 0;
    opacity: 0.9;
}

.ticket-hero-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.big-status {
    font-size: 13px;
    padding: 10px 14px;
    background: #e0f2fe;
    color: #0369a1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 14px;
}

.detail-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px;
}

.detail-box span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.detail-box strong {
    color: #0f172a;
}

.description-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
    color: #0f172a;
}

.attachment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 12px;
}

.attachment-card {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 18px;
    transition: all 0.22s ease;
}

.attachment-card:hover {
    transform: translateY(-4px);
    background: #e0f2fe;
}

.attachment-card i {
    font-size: 24px;
    color: #0077d9;
}

.attachment-card small {
    display: block;
    color: #64748b;
    word-break: break-word;
}

.service-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
}

.service-card h5 {
    font-weight: 900;
    color: #073763;
}

.service-card p {
    margin-bottom: 8px;
}

.timeline {
    position: relative;
    padding-left: 18px;
}

.timeline-item {
    position: relative;
    padding-left: 22px;
    padding-bottom: 18px;
    border-left: 2px solid #e2e8f0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -8px;
    top: 2px;
    width: 14px;
    height: 14px;
    background: #0077d9;
    border-radius: 50%;
    border: 3px solid #e0f2fe;
}

.timeline-content h6 {
    margin: 0 0 4px;
    font-weight: 900;
}

.timeline-content p {
    margin: 0 0 4px;
    color: #475569;
}

.timeline-content small {
    color: #64748b;
}

@media (max-width: 768px) {
    .ticket-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .ticket-hero-right {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-grid,
    .attachment-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   Courier Details Styling
========================= */

.courier-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
}

.courier-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.courier-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0077d9, #00b4ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.courier-main h5 {
    margin: 0;
    font-weight: 900;
    color: #073763;
}

.courier-main p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.courier-main strong {
    color: #0f172a;
    font-size: 18px;
}
.empty-state-box {
    background: #ffffff;
    border-radius: 24px;
    padding: 34px;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.empty-state-box .empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
    color: #0077d9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 16px;
}

.empty-state-box h4 {
    font-weight: 900;
    color: #0f172a;
}

.empty-state-box p {
    color: #64748b;
    max-width: 760px;
    margin: 8px auto 18px;
}