/* =========================================================
   Telecom Maintenance
   Global Design System
   SAP Fiori Inspired / RTL / Responsive
   ========================================================= */


/* =========================================================
   01. Design Tokens
   ========================================================= */

:root {

    /* Brand */

    --primary: #006b8f;
    --primary-dark: #00536f;
    --primary-light: #e8f4f8;
    --primary-hover: #005d7c;

    /* Accent */

    --accent: #00a6c7;
    --accent-light: #e8f8fb;

    /* Surfaces */

    --background: #f5f7f8;
    --surface: #ffffff;
    --surface-secondary: #f8fafb;
    --surface-hover: #f1f6f8;

    /* Sidebar */

    --sidebar-background: #ffffff;
    --sidebar-border: #dce4e8;
    --sidebar-width: 250px;

    /* Text */

    --text: #1d2935;
    --text-secondary: #475569;
    --text-muted: #6b7280;
    --text-light: #94a3b8;

    /* Border */

    --border: #dfe6ea;
    --border-light: #edf1f3;

    /* Status */

    --success: #2e7d32;
    --success-light: #eaf5eb;

    --warning: #d88a00;
    --warning-light: #fff5df;

    --danger: #c62828;
    --danger-light: #fdecec;

    --info: #0277bd;
    --info-light: #e8f4fc;

    /* Layout */

    --topbar-height: 64px;

    /* Radius */

    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 14px;

    /* Shadow */

    --shadow-sm:
        0 1px 3px rgba(15, 23, 42, 0.06);

    --shadow-md:
        0 4px 12px rgba(15, 23, 42, 0.08);

    --shadow-lg:
        0 10px 30px rgba(15, 23, 42, 0.10);

    /* Typography */

    --font-family:
        "Vazirmatn",
        Tahoma,
        Arial,
        sans-serif;

}


/* =========================================================
   02. Reset
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}


html {
    min-height: 100%;
    font-size: 16px;
}


body {
    min-height: 100vh;

    margin: 0;

    background: var(--background);
    color: var(--text);

    font-family: var(--font-family);

    font-size: 14px;
    line-height: 1.7;

    direction: rtl;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


a {
    color: inherit;
    text-decoration: none;
}


button,
input,
select,
textarea {
    font-family: inherit;
}


button {
    cursor: pointer;
}


img {
    max-width: 100%;
}


table {
    border-collapse: collapse;
}


/* =========================================================
   03. Main Application Layout
   ========================================================= */

.app {
    min-height: 100vh;

    display: flex;
    flex-direction: row-reverse;

    background: var(--background);
}


/* =========================================================
   04. Sidebar
   ========================================================= */

.sidebar {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    z-index: 1000;

    width: var(--sidebar-width);

    display: flex;
    flex-direction: column;

    background: var(--sidebar-background);

    border-left: 1px solid var(--sidebar-border);

    box-shadow:
        -2px 0 10px rgba(15, 23, 42, 0.04);
}


/* =========================================================
   05. Sidebar Header / Brand
   ========================================================= */

.sidebar-header {
    height: var(--topbar-height);

    display: flex;
    align-items: center;

    padding: 0 18px;

    border-bottom: 1px solid var(--border-light);
}


.brand {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 11px;
}


.brand-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

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

    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
        );

    color: #ffffff;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.5px;

    box-shadow:
        0 3px 8px rgba(0, 107, 143, 0.20);
}


.brand-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.brand-title {
    overflow: hidden;

    color: var(--text);

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

    white-space: nowrap;
    text-overflow: ellipsis;
}


.brand-subtitle {
    margin-top: 1px;

    color: var(--text-muted);

    font-family:
        "JetBrains Mono",
        Consolas,
        monospace;

    font-size: 9px;

    direction: ltr;
    text-align: right;
}


/* =========================================================
   06. Sidebar Navigation
   ========================================================= */

.sidebar-nav {
    flex: 1;

    overflow-y: auto;

    padding: 14px 10px;

}


.nav-section {
    margin-bottom: 20px;
}


.nav-section:last-child {
    margin-bottom: 0;
}


.nav-section-title {
    padding: 0 11px;
    margin-bottom: 6px;

    color: var(--text-light);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.2px;
}


.nav-item {
    position: relative;

    min-height: 42px;

    display: flex;
    align-items: center;

    gap: 11px;

    margin-bottom: 3px;
    padding: 8px 11px;

    border-radius: var(--radius-md);

    color: var(--text-secondary);

    font-size: 13px;
    font-weight: 500;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}


.nav-item:hover {
    background: var(--surface-hover);

    color: var(--primary);
}


.nav-item.active {
    background: var(--primary-light);

    color: var(--primary);

    font-weight: 700;
}


.nav-item.active::before {
    content: "";

    position: absolute;

    right: 0;
    top: 8px;
    bottom: 8px;

    width: 3px;

    border-radius: 3px 0 0 3px;

    background: var(--primary);
}


.nav-icon {
    width: 24px;
    height: 24px;

    flex: 0 0 24px;

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

    font-size: 16px;

    line-height: 1;
}


.nav-label {
    flex: 1;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   07. Sidebar Footer / User
   ========================================================= */

.sidebar-footer {
    padding: 12px;

    border-top: 1px solid var(--border-light);
}


.user-box {
    min-height: 54px;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 8px;

    background: var(--surface-secondary);

    border: 1px solid var(--border-light);

    border-radius: var(--radius-md);
}


.user-avatar {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

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

    border-radius: 50%;

    background: var(--primary-light);

    color: var(--primary);

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


.user-info {
    min-width: 0;
    flex: 1;
}


.user-name {
    overflow: hidden;

    color: var(--text);

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
    text-overflow: ellipsis;
}


.user-role {
    margin-top: 1px;

    color: var(--text-muted);

    font-size: 9px;
}


.logout-button {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

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

    padding: 0;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: var(--surface);

    color: var(--text-muted);

    font-size: 16px;

    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}


.logout-button:hover {
    background: var(--danger-light);

    border-color: #f0c5c5;

    color: var(--danger);
}


/* =========================================================
   08. Main Content
   ========================================================= */

.main {
    min-width: 0;

    flex: 1;

    margin-right: var(--sidebar-width);
}


.main-inner {
    width: 100%;
    max-width: 1600px;

    margin: 0 auto;

    padding: 0 28px 40px;
}


/* =========================================================
   09. Topbar
   ========================================================= */

.topbar {
    min-height: var(--topbar-height);

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

    gap: 20px;

    border-bottom: 1px solid var(--border-light);

    background: var(--background);
}


.breadcrumb {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 8px;

    color: var(--text-muted);

    font-size: 11px;
}


.breadcrumb-current {
    color: var(--text);
    font-weight: 600;
}


.topbar-actions {
    display: flex;
    align-items: center;

    gap: 8px;
}


/* =========================================================
   10. Messages
   ========================================================= */

.messages {
    margin-top: 16px;
}


.alert {
    padding: 11px 14px;

    border: 1px solid transparent;

    border-radius: var(--radius-md);

    font-size: 12px;
}


.alert-success {
    background: var(--success-light);
    border-color: #c7e4ca;
    color: var(--success);
}


.alert-warning {
    background: var(--warning-light);
    border-color: #f2dfb3;
    color: #8a5a00;
}


.alert-danger,
.alert-error {
    background: var(--danger-light);
    border-color: #efc8c8;
    color: var(--danger);
}


.alert-info {
    background: var(--info-light);
    border-color: #c7e4f5;
    color: var(--info);
}


/* =========================================================
   11. Generic Container
   ========================================================= */

.container-fluid {
    width: 100%;
}


/* =========================================================
   12. Generic Cards
   ========================================================= */

.card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    overflow: hidden;
}


.card-header {
    min-height: 50px;

    display: flex;
    align-items: center;

    padding: 12px 16px;

    background: var(--surface);

    border-bottom: 1px solid var(--border-light);

    color: var(--text);

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


.card-body {
    padding: 18px;
}


.card-footer {
    padding: 12px 16px;

    background: var(--surface-secondary);

    border-top: 1px solid var(--border-light);
}


/* =========================================================
   13. Dashboard
   ========================================================= */

.dashboard-page {
    width: 100%;
    max-width: 1600px;

    margin: 0 auto;

    padding-bottom: 32px;
}


.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 22px;
}


.dashboard-title {
    margin: 0;

    color: var(--text);

    font-size: 1.3rem;
    font-weight: 700;

    line-height: 1.8;
}


.dashboard-subtitle {
    margin: 3px 0 0;

    color: var(--text-muted);

    font-size: 0.78rem;
}


.dashboard-section {
    margin-top: 22px;
}


.dashboard-section-title {
    margin-bottom: 11px;

    color: var(--text);

    font-size: 0.82rem;
    font-weight: 700;
}


/* =========================================================
   14. Dashboard Statistics
   ========================================================= */

.dashboard-stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}


.dashboard-stat-card {
    min-height: 104px;

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

    padding: 16px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


.dashboard-stat-card:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow-md);
}


.dashboard-stat-content {
    min-width: 0;
}


.dashboard-stat-label {
    color: var(--text-muted);

    font-size: 0.76rem;
    font-weight: 500;
}


.dashboard-stat-value {
    margin-top: 7px;

    color: var(--text);

    font-size: 1.65rem;
    font-weight: 700;

    line-height: 1;
}


.dashboard-stat-icon {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

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

    border-radius: 8px;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 17px;
}


/* =========================================================
   15. Dashboard Status
   ========================================================= */

.dashboard-status-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}


.dashboard-status-card {
    min-height: 80px;

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

    padding: 14px 18px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);
}


.dashboard-status-label {
    font-size: 0.78rem;
    font-weight: 600;
}


.dashboard-status-value {
    font-size: 1.45rem;
    font-weight: 700;
}


.status-success,
.pm-success {
    border-right: 4px solid var(--success);
}


.status-warning,
.pm-warning {
    border-right: 4px solid var(--warning);
}


.status-danger,
.pm-danger {
    border-right: 4px solid var(--danger);
}


/* =========================================================
   16. Dashboard Panels
   ========================================================= */

.dashboard-panel {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    overflow: hidden;

    box-shadow: var(--shadow-sm);
}


.dashboard-panel-header {
    min-height: 48px;

    display: flex;
    align-items: center;

    padding: 12px 16px;

    border-bottom: 1px solid var(--border-light);

    color: var(--text);

    font-size: 0.82rem;
    font-weight: 700;
}


/* =========================================================
   17. Dashboard Table
   ========================================================= */

.dashboard-table-wrapper {
    width: 100%;

    overflow-x: auto;
}


.dashboard-table {
    width: 100%;

    white-space: nowrap;
}


.dashboard-table th {
    padding: 11px 15px;

    background: var(--surface-secondary);

    color: var(--text-muted);

    border-bottom: 1px solid var(--border);

    font-size: 0.72rem;
    font-weight: 600;

    text-align: right;
}


.dashboard-table td {
    padding: 12px 15px;

    border-bottom: 1px solid var(--border-light);

    color: var(--text-secondary);

    font-size: 0.77rem;
}


.dashboard-table tbody tr {
    transition: background 0.15s ease;
}


.dashboard-table tbody tr:hover {
    background: var(--surface-hover);
}


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


/* =========================================================
   18. Badges
   ========================================================= */

.dashboard-badge,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 64px;

    padding: 4px 9px;

    border-radius: 5px;

    font-size: 0.68rem;
    font-weight: 600;

    line-height: 1.5;
}


/* Bootstrap-like status colors */

.bg-success {
    background: var(--success) !important;
    color: #ffffff !important;
}


.bg-warning {
    background: var(--warning) !important;
    color: #ffffff !important;
}


.bg-danger {
    background: var(--danger) !important;
    color: #ffffff !important;
}


.bg-info {
    background: var(--info) !important;
    color: #ffffff !important;
}


/* =========================================================
   19. Dashboard Records
   ========================================================= */

.dashboard-two-column {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;

    margin-top: 22px;
}


.dashboard-record-list {
    margin: 0;
    padding: 0;

    list-style: none;
}


.dashboard-record-item {
    min-height: 45px;

    display: flex;
    align-items: center;

    padding: 11px 15px;

    border-bottom: 1px solid var(--border-light);

    color: var(--text-secondary);

    font-size: 0.77rem;
}


.dashboard-record-item:last-child {
    border-bottom: none;
}


.dashboard-record-separator {
    margin: 0 7px;

    color: var(--text-light);
}


.dashboard-record-empty {
    padding: 25px 15px;

    color: var(--text-muted);

    text-align: center;

    font-size: 0.76rem;
}


.dashboard-empty {
    padding: 26px !important;

    color: var(--text-muted);

    text-align: center;
}


/* =========================================================
   20. Dashboard Charts
   ========================================================= */

.dashboard-charts-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;
}


.dashboard-chart-card {
    min-width: 0;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius-lg);

    overflow: hidden;

    box-shadow: var(--shadow-sm);
}


.dashboard-chart-body {
    position: relative;

    height: 220px;

    padding: 14px;
}


.dashboard-chart-bar {
    height: 220px;
}


/* =========================================================
   21. Generic Buttons
   ========================================================= */

.btn {
    min-height: 36px;

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

    gap: 6px;

    padding: 7px 14px;

    border: 1px solid transparent;

    border-radius: var(--radius-md);

    font-size: 0.78rem;
    font-weight: 600;

    line-height: 1.5;

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


.btn:hover {
    transform: none;
}


.btn-primary {
    background: var(--primary);
    border-color: var(--primary);

    color: #ffffff;
}


.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);

    color: #ffffff;
}


.btn-success {
    background: var(--success);
    border-color: var(--success);

    color: #ffffff;
}


.btn-danger {
    background: var(--danger);
    border-color: var(--danger);

    color: #ffffff;
}


.btn-warning {
    background: var(--warning);
    border-color: var(--warning);

    color: #ffffff;
}


.btn-outline-primary {
    background: transparent;

    border-color: var(--primary);

    color: var(--primary);
}


.btn-outline-primary:hover {
    background: var(--primary-light);
}


/* =========================================================
   22. Generic Forms
   ========================================================= */

.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;

    min-height: 38px;

    padding: 7px 10px;

    background: var(--surface);

    border: 1px solid #cfd9de;

    border-radius: var(--radius-md);

    color: var(--text);

    font-size: 0.8rem;

    outline: none;

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


.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(0, 107, 143, 0.10);
}


textarea {
    min-height: 100px;

    resize: vertical;
}


label {
    color: var(--text-secondary);

    font-size: 0.78rem;
    font-weight: 600;
}


/* =========================================================
   23. Generic Tables
   ========================================================= */

.table-responsive {
    width: 100%;

    overflow-x: auto;
}


.table {
    width: 100%;

    margin-bottom: 0;

    color: var(--text);

    vertical-align: middle;
}


.table th {
    padding: 11px 14px;

    background: var(--surface-secondary);

    border-bottom: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 0.72rem;
    font-weight: 600;

    text-align: right;

    white-space: nowrap;
}


.table td {
    padding: 11px 14px;

    border-bottom: 1px solid var(--border-light);

    color: var(--text-secondary);

    font-size: 0.77rem;
}


.table tbody tr:hover {
    background: var(--surface-hover);
}


/* =========================================================
   24. List Groups
   ========================================================= */

.list-group {
    margin: 0;
    padding: 0;

    list-style: none;
}


.list-group-item {
    padding: 11px 15px;

    background: var(--surface);

    border-bottom: 1px solid var(--border-light);

    color: var(--text-secondary);

    font-size: 0.77rem;
}


.list-group-item:last-child {
    border-bottom: none;
}


/* =========================================================
   25. Utility Overrides
   ========================================================= */

.text-center {
    text-align: center !important;
}


.text-white {
    color: #ffffff !important;
}


.text-muted {
    color: var(--text-muted) !important;
}


.bg-success {
    background: var(--success) !important;
}


.bg-warning {
    background: var(--warning) !important;
}


.bg-danger {
    background: var(--danger) !important;
}


.border-success {
    border-color: var(--success) !important;
}


.border-warning {
    border-color: var(--warning) !important;
}


.border-danger {
    border-color: var(--danger) !important;
}


/* =========================================================
   26. Scrollbar
   ========================================================= */



::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}


::-webkit-scrollbar-track {
    background: transparent;
}


::-webkit-scrollbar-thumb {
    background: #c7d2d8;

    border-radius: 10px;
}


::-webkit-scrollbar-thumb:hover {
    background: #aab8c0;
}


/* =========================================================
   27. Responsive - Laptop
   ========================================================= */

@media (max-width: 1200px) {

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

    .main-inner {
        padding-left: 22px;
        padding-right: 22px;
    }

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

    .dashboard-charts-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-chart-card:last-child {
        grid-column: 1 / -1;
    }
}


/* =========================================================
   28. Responsive - Tablet
   ========================================================= */

@media (max-width: 900px) {

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

    .main-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .dashboard-two-column {
        grid-template-columns: 1fr;
    }

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

    .dashboard-chart-card:last-child {
        grid-column: auto;
    }
}


/* =========================================================
   29. Responsive - Mobile
   ========================================================= */

@media (max-width: 700px) {

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

    .app {
        display: block;
    }

    .sidebar {
        position: relative;

        width: 100%;

        max-height: none;

        border-left: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-nav {
        max-height: 350px;
    }

    .sidebar-footer {
        display: none;
    }

    .main {
        margin-right: 0;
    }

    .main-inner {
        padding: 0 12px 30px;
    }

    .topbar {
        min-height: 54px;
    }

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

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

    .dashboard-two-column {
        grid-template-columns: 1fr;
    }

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

    .dashboard-title {
        font-size: 1.05rem;
    }

    .dashboard-subtitle {
        font-size: 0.72rem;
    }
}


/* =========================================================
   30. Very Small Screens
   ========================================================= */

@media (max-width: 480px) {

    .sidebar-header {
        padding: 0 12px;
    }

    .main-inner {
        padding-left: 8px;
        padding-right: 8px;
    }

    .dashboard-stat-card {
        min-height: 88px;

        padding: 13px;
    }

    .dashboard-stat-value {
        font-size: 1.45rem;
    }

    .dashboard-chart-body {
        height: 210px;
    }

    .dashboard-table {
        min-width: 620px;
    }
}


/* =========================================================
   Telecom Maintenance
   Unified UI - SAP Fiori Inspired
   RTL / Persian / Laptop Responsive
   ========================================================= */

:root {
    --primary: #007e9e;
    --primary-dark: #00677f;
    --primary-light: #e7f4f7;

    --text: #1d2939;
    --text-muted: #667085;

    --border: #d9e2e7;
    --border-light: #e9eef1;

    --background: #f5f7f8;
    --surface: #ffffff;

    --success: #16803c;
    --success-light: #e8f5ed;

    --warning: #b78103;
    --warning-light: #fff7df;

    --danger: #c73535;
    --danger-light: #fdecec;

    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
    --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --sidebar-width: 250px;
}


/* =========================================================
   Base
   ========================================================= */

html {
    direction: rtl;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        "Vazirmatn",
        "Tahoma",
        Arial,
        sans-serif;

    font-size: 14px;
    line-height: 1.8;
}


/* =========================================================
   Layout
   ========================================================= */

.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    padding: 28px 30px;
}


/* =========================================================
   Page Header
   ========================================================= */

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 24px;
    padding-bottom: 18px;

    border-bottom: 1px solid var(--border-light);
}

.page-title {
    margin: 0;

    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.page-sub {
    margin: 5px 0 0;

    color: var(--text-muted);
    font-size: 13px;
}


/* =========================================================
   Cards
   ========================================================= */

.center-card,
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.cc-body,
.card-body {
    padding: 20px;
}

.card-header {
    padding: 15px 20px;

    background: #fafcfd;

    border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-md) var(--radius-md) 0 0;

    font-weight: 600;
    color: var(--text);
}


/* =========================================================
   Forms
   ========================================================= */

label {
    display: block;

    margin-bottom: 7px;

    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;

    box-sizing: border-box;

    min-height: 42px;

    padding: 8px 12px;

    background: #fff;

    border: 1px solid #cbd5dc;
    border-radius: var(--radius-sm);

    color: var(--text);

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

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

input:focus,
select:focus,
textarea:focus {
    outline: none;

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(0, 126, 158, 0.12);
}

select {
    cursor: pointer;
}


/* =========================================================
   Buttons
   ========================================================= */

.btn {
    display: inline-flex;

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

    min-height: 40px;

    padding: 7px 16px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);

    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);

    color: #fff;
}

.btn-secondary {
    background: #fff;
    border-color: #cbd5dc;

    color: var(--text);
}

.btn-secondary:hover {
    background: #f5f8fa;
    border-color: #aebbc4;
}


/* =========================================================
   Filters
   ========================================================= */

.center-card form {
    width: 100%;
}

.center-card form > div {
    width: 100%;
}

.center-card form input,
.center-card form select {
    min-height: 42px;
}


/* =========================================================
   Tables
   ========================================================= */

.table-wrapper {
    width: 100%;

    overflow-x: auto;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);
}

.table-wrapper table {
    width: 100%;

    min-width: 680px;

    border-collapse: separate;
    border-spacing: 0;

    background: var(--surface);
}


/* Header */

.table-wrapper thead th {
    height: 48px;

    padding: 0 18px;

    background: #f7f9fa;

    border-bottom: 1px solid var(--border);

    color: #475467;

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

    text-align: right;

    white-space: nowrap;
}


/* Body */

.table-wrapper tbody td {
    padding: 14px 18px;

    border-bottom: 1px solid var(--border-light);

    color: var(--text);

    font-size: 13px;

    text-align: right;

    vertical-align: middle;
}


/* Last row */

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


/* Hover */

.table-wrapper tbody tr {
    transition: background 0.12s ease;
}

.table-wrapper tbody tr:hover {
    background: #f8fbfc;
}


/* Center name */

.table-wrapper tbody td:first-child {
    font-weight: 600;
}


/* Operation column */

.table-wrapper tbody td:last-child {
    white-space: nowrap;
}


/* Buttons inside tables */

.table-wrapper .btn {
    min-height: 34px;

    padding: 5px 13px;

    font-size: 12px;
}


/* =========================================================
   Badges
   ========================================================= */

.badge {
    display: inline-flex;

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

    min-width: 58px;

    padding: 4px 10px;

    border-radius: 20px;

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

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}


/* =========================================================
   Empty State
   ========================================================= */

.empty-state {
    padding: 35px 20px;

    color: var(--text-muted);

    text-align: center;

    font-size: 13px;
}


/* =========================================================
   Pagination
   ========================================================= */

.table-wrapper + div {
    display: flex;

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

    gap: 8px;

    margin-top: 20px;
}

.table-wrapper + div .btn {
    min-width: 70px;
}

.table-wrapper + div span.btn {
    cursor: default;

    background: #eef2f4;
}


/* =========================================================
   Bootstrap compatibility
   ========================================================= */

.bg-success {
    background-color: var(--success) !important;
}

.bg-warning {
    background-color: #d69e17 !important;
}

.bg-danger {
    background-color: var(--danger) !important;
}

.border-success {
    border-color: var(--success) !important;
}

.border-warning {
    border-color: #d69e17 !important;
}

.border-danger {
    border-color: var(--danger) !important;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {

    .main-content {
        padding: 24px;
    }

    .page-title {
        font-size: 21px;
    }

    .center-card form > div {
        grid-template-columns: 1fr 1fr !important;
    }
}


@media (max-width: 768px) {

    .main-content {
        margin-right: 0;

        padding: 18px;
    }

    .page-head {
        align-items: flex-start;
    }

    .page-title {
        font-size: 20px;
    }

    .page-sub {
        font-size: 12px;
    }

    .center-card form > div {
        grid-template-columns: 1fr !important;
    }

    .table-wrapper {
        border-radius: var(--radius-sm);
    }

    .table-wrapper table {
        min-width: 620px;
    }
}


@media (max-width: 480px) {

    .main-content {
        padding: 14px;
    }

    .cc-body,
    .card-body {
        padding: 14px;
    }

    .page-title {
        font-size: 18px;
    }
}

/* =========================================================
   Record Detail
   ========================================================= */

.record-detail-card {
    width: 100%;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);

    overflow: hidden;
}


.record-detail-header {
    padding: 16px 20px;

    background: #f7f9fa;

    border-bottom: 1px solid var(--border);

    color: var(--text);

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


.record-detail-table-wrapper {
    width: 100%;

    overflow-x: auto;
}


.record-detail-table {
    width: 100%;

    border-collapse: collapse;

    table-layout: fixed;
}


.record-detail-table thead th {
    padding: 13px 20px;

    background: #f9fafb;

    border-bottom: 1px solid var(--border);

    color: #475467;

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

    text-align: right;
}


.record-detail-table thead th:first-child {
    width: 30%;
}


.record-detail-table thead th:last-child {
    width: 70%;
}


.record-detail-table tbody td {
    padding: 13px 20px;

    border-bottom: 1px solid var(--border-light);

    font-size: 13px;

    text-align: right;

    vertical-align: middle;

    line-height: 1.8;
}


.record-detail-table tbody tr:last-child td {
    border-bottom: none;
}


.record-detail-table tbody tr:hover {
    background: #f8fbfc;
}


/* عنوان فیلد */

.record-detail-table tbody td:first-child {
    background: #fbfcfd;

    color: #475467;

    font-weight: 600;
}


/* مقدار فیلد */

.record-detail-table tbody td:last-child {
    color: var(--text);

    font-weight: 500;
}


/* تاریخ */

.record-detail-table .record-date {
    direction: ltr;

    text-align: right;

    font-family: Tahoma, sans-serif;
}


/* توضیحات */

.record-detail-table .notes-row td:last-child {
    white-space: normal;
}


/* جلوگیری از margin اضافه linebreaks */

.record-detail-table .notes-row p {
    margin: 0;
}


/* =========================================================
   Record Detail Responsive
   ========================================================= */

@media (max-width: 768px) {

    .record-detail-table {
        min-width: 600px;
    }

    .record-detail-table thead th,
    .record-detail-table tbody td {
        padding: 11px 14px;
    }

}

:root {
            --primary: #007e9e;
            --primary-dark: #00677f;
            --primary-light: #e7f4f7;

            --text: #1d2939;
            --muted: #667085;

            --border: #d9e2e7;
            --background: #f5f7f8;
            --surface: #ffffff;

            --danger: #d92d20;
            --danger-light: #fef3f2;
        }

        * {
            box-sizing: border-box;
        }

        html,
        body {
            width: 100%;
            min-height: 100%;
            margin: 0;
        }

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

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

            padding: 30px 20px;

            background:
                radial-gradient(
                    circle at 15% 20%,
                    rgba(0, 126, 158, 0.09),
                    transparent 30%
                ),
                radial-gradient(
                    circle at 85% 80%,
                    rgba(0, 126, 158, 0.07),
                    transparent 30%
                ),
                var(--background);

            color: var(--text);

            font-family:
                Vazirmatn,
                Tahoma,
                Arial,
                sans-serif;

            font-size: 14px;
            line-height: 1.8;
        }

        .login-wrapper {
            width: 100%;
            max-width: 450px;
        }

        .login-card {
            position: relative;

            width: 100%;

            padding: 38px 40px 30px;

            background: var(--surface);

            border: 1px solid var(--border);
            border-radius: 18px;

            box-shadow:
                0 20px 50px rgba(16, 24, 40, 0.08),
                0 4px 12px rgba(16, 24, 40, 0.04);
        }

        /*
        ==========================
        Logo
        ==========================
        */

        .logo {
            width: 64px;
            height: 64px;

            margin: 0 auto 20px;

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

            border-radius: 16px;

            background:
                linear-gradient(
                    135deg,
                    var(--primary),
                    var(--primary-dark)
                );

            color: #ffffff;

            font-size: 20px;
            font-weight: 800;
            letter-spacing: 1px;

            box-shadow:
                0 10px 22px rgba(0, 126, 158, 0.20);
        }

        .login-card h1 {
            margin: 0;

            text-align: center;

            color: var(--text);

            font-size: 21px;
            font-weight: 800;

            line-height: 1.8;
        }

        .subtitle {
            margin-top: 5px;
            margin-bottom: 28px;

            text-align: center;

            color: var(--muted);

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

        /*
        ==========================
        Errors
        ==========================
        */

        .error {
            margin-top: 7px;

            color: var(--danger);

            font-size: 12px;
            line-height: 1.7;
        }

        .login-card > .error {
            margin-top: 0;
            margin-bottom: 20px;

            padding: 11px 13px;

            background: var(--danger-light);

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

            color: var(--danger);
        }

        .login-card > .error ul {
            margin: 0;
            padding: 0;

            list-style: none;
        }

        /*
        ==========================
        Form
        ==========================
        */

        .field {
            margin-bottom: 18px;
        }

        .field label {
            display: block;

            margin-bottom: 7px;

            color: var(--text);

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

        .field input {
            width: 100%;
            height: 46px;

            padding: 9px 13px;

            background: #ffffff;

            border: 1px solid var(--border);
            border-radius: 9px;

            outline: none;

            color: var(--text);

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

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

        .field input:hover {
            border-color: #b9cbd1;
        }

        .field input:focus {
            border-color: var(--primary);

            background: #ffffff;

            box-shadow:
                0 0 0 3px rgba(0, 126, 158, 0.10);
        }

        .field input::placeholder {
            color: #98a2b3;
        }

        /*
        ==========================
        Username / Password icons
        ==========================
        */

        .field:first-of-type {
            position: relative;
        }

        .field:nth-of-type(2) {
            position: relative;
        }

        .field:first-of-type::before {
            content: "◉";

            position: absolute;

            left: 13px;
            bottom: 13px;

            color: #98a2b3;

            font-size: 13px;

            pointer-events: none;
        }

        .field:nth-of-type(2)::before {
            content: "●";

            position: absolute;

            left: 13px;
            bottom: 13px;

            color: #98a2b3;

            font-size: 11px;

            pointer-events: none;
        }

        .field input {
            padding-left: 38px;
        }

        /*
        ==========================
        Login button
        ==========================
        */

        .login-button {
            width: 100%;
            height: 46px;

            margin-top: 5px;

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

            border: 1px solid var(--primary);
            border-radius: 9px;

            background:
                linear-gradient(
                    135deg,
                    var(--primary),
                    var(--primary-dark)
                );

            color: #ffffff;

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

            cursor: pointer;

            box-shadow:
                0 7px 16px rgba(0, 126, 158, 0.18);

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

        .login-button:hover {
            box-shadow:
                0 9px 20px rgba(0, 126, 158, 0.24);

            transform: translateY(-1px);
        }

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

        /*
        ==========================
        Footer
        ==========================
        */

        .footer {
            position: relative;

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

            border-top: 1px solid #edf1f3;

            text-align: center;

            color: #98a2b3;

            font-size: 11px;
        }

        /*
        ==========================
        Responsive
        ==========================
        */

        @media (max-width: 520px) {

            body.login-page {
                padding: 18px 12px;
            }

            .login-card {
                padding: 30px 22px 24px;

                border-radius: 14px;
            }

            .logo {
                width: 58px;
                height: 58px;

                margin-bottom: 17px;

                border-radius: 14px;

                font-size: 18px;
            }

            .login-card h1 {
                font-size: 18px;
            }

            .subtitle {
                margin-bottom: 24px;
            }
        }

        @media (max-width: 360px) {

            .login-card {
                padding: 25px 17px 22px;
            }

            .login-card h1 {
                font-size: 17px;
            }
        }

/* =====================================================
   Battery Detail
   ===================================================== */

.battery-detail-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(0, 1fr);

    gap: 20px;

    align-items: start;

    width: 100%;
}


/* =====================================================
   Card
   ===================================================== */

.battery-detail-card {
    width: 100%;

    background: #ffffff;

    border: 1px solid #d9e2e7;

    border-radius: 10px;

    box-shadow:
        0 2px 8px rgba(16, 24, 40, 0.04);

    overflow: hidden;
}


/* =====================================================
   Card Title
   ===================================================== */

.battery-card-title {
    padding: 14px 18px;

    background: #f6f9fa;

    border-bottom: 1px solid #d9e2e7;

    color: #1d2939;

    font-size: 14px;

    font-weight: 700;

    line-height: 1.8;

    text-align: right;
}


/* =====================================================
   Table
   ===================================================== */

.battery-table-wrapper {
    width: 100%;

    overflow-x: auto;
}


.battery-detail-table {
    width: 100%;

    border-collapse: collapse;

    border-spacing: 0;

    table-layout: fixed;
}


/* Header */

.battery-detail-table thead th {
    height: 44px;

    padding: 0 16px;

    background: #f9fbfc;

    border-bottom: 1px solid #d9e2e7;

    color: #344054;

    font-size: 12px;

    font-weight: 700;

    text-align: right;

    vertical-align: middle;

    white-space: nowrap;
}


/* Column widths */

.battery-detail-table th:first-child,
.battery-detail-table td:first-child {
    width: 52%;
}


/* Body */

.battery-detail-table tbody td {
    min-height: 46px;

    padding: 11px 16px;

    border-bottom: 1px solid #e7ecef;

    color: #475467;

    font-size: 13px;

    line-height: 1.8;

    text-align: right;

    vertical-align: middle;

    overflow-wrap: break-word;
}


/* Label column */

.battery-detail-table tbody td:first-child {
    color: #344054;

    font-weight: 600;

    background: #fcfdfe;
}


/* Value column */

.battery-detail-table tbody td:last-child {
    color: #475467;
}


/* Last row */

.battery-detail-table tbody tr:last-child td {
    border-bottom: none;
}


/* Hover */

.battery-detail-table tbody tr:hover td {
    background: #f8fbfc;
}


/* =====================================================
   Units
   ===================================================== */

.unit {
    margin-right: 4px;

    color: #667085;

    font-size: 11px;
}


/* =====================================================
   Date
   ===================================================== */

.battery-date {
    direction: ltr;

    text-align: right !important;

    white-space: nowrap;
}


/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 900px) {

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

}


@media (max-width: 768px) {

    .battery-detail-grid {
        gap: 15px;
    }

    .battery-card-title {
        padding: 12px 14px;
    }

    .battery-detail-table thead th,
    .battery-detail-table tbody td {
        padding-left: 12px;
        padding-right: 12px;
    }

}
.locked-user-label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.locked-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #007e9e;

    font-size: 16px;
    line-height: 1;
}

.locked-icon i {
    color: inherit;
    font-style: normal;
}

.locked-user-label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.locked-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #007e9e;

    font-size: 16px;
    line-height: 1;
}

.locked-icon i {
    color: inherit;
    font-style: normal;
}
        :root {
            --primary: #007e9e;
            --primary-dark: #00677f;
            --primary-light: #e7f4f7;
            --text: #1d2939;
            --muted: #667085;
            --border: #d9e2e7;
            --background: #f5f7f8;
            --surface: #ffffff;
            --danger: #d92d20;
            --danger-light: #fef3f2;
        }

        * {
            box-sizing: border-box;
        }

        html,
        body {
            margin: 0;
            padding: 0;
        }

        body {
            min-height: 100vh;
            background: var(--background);
            color: var(--text);
            font-family: Vazirmatn, Tahoma, Arial, sans-serif;
            font-size: 14px;
            line-height: 1.8;
        }

        .container {
            width: min(1100px, calc(100% - 40px));
            margin: 40px auto;
            padding: 30px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 14px;
            box-shadow: 0 4px 18px rgba(16, 24, 40, 0.06);
        }

        h1 {
            margin: 0;
            font-size: 24px;
            font-weight: 700;
            color: var(--text);
        }

        .subtitle {
            margin-top: 5px;
            color: var(--muted);
            font-size: 13px;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 22px;
            padding: 12px 16px;
            background: var(--primary-light);
            border: 1px solid #cce8ee;
            border-radius: 9px;
            color: var(--primary-dark);
        }

        .user-info::before {
            content: "\F4DA";
            font-family: "bootstrap-icons";
            font-size: 17px;
            color: var(--primary);
        }

        .user-info strong {
            color: var(--text);
        }

        .non-field-errors {
            margin-top: 18px;
            padding: 12px 15px;
            background: var(--danger-light);
            border: 1px solid #fecdca;
            border-radius: 8px;
            color: var(--danger);
            font-size: 13px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 20px;
            margin-top: 25px;
        }

        .form-group {
            min-width: 0;
        }

        .form-group.full {
            grid-column: 1 / -1;
        }

        .form-group > label {
            display: block;
            margin-bottom: 7px;
            color: var(--text);
            font-size: 13px;
            font-weight: 600;
        }

        .form-group input:not([type="checkbox"]),
        .form-group select,
        .form-group textarea {
            width: 100%;
            min-height: 44px;
            padding: 9px 13px;
            border: 1px solid var(--border);
            border-radius: 8px;
            outline: none;
            background: #fff;
            color: var(--text);
            font-family: inherit;
            font-size: 13px;
            line-height: 1.7;
            transition:
                border-color 0.2s ease,
                box-shadow 0.2s ease;
        }

        .form-group textarea {
            min-height: 110px;
            resize: vertical;
        }

        .form-group input:not([type="checkbox"]):focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(0, 126, 158, 0.10);
        }

        .form-group input::placeholder,
        .form-group textarea::placeholder {
            color: #98a2b3;
        }

        .form-group small {
            display: block;
            margin-top: 5px;
            color: var(--muted);
            font-size: 12px;
        }

        .checkbox-field {
            display: flex;
            align-items: center;
            gap: 9px;
            min-height: 44px;
            padding: 9px 12px;
            background: #fafcfd;
            border: 1px solid var(--border);
            border-radius: 8px;
        }

        .checkbox-field input[type="checkbox"] {
            width: 17px;
            height: 17px;
            margin: 0;
            accent-color: var(--primary);
            cursor: pointer;
        }

        .checkbox-field label {
            margin: 0;
            color: var(--text);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
        }

        .error {
            margin-top: 6px;
            color: var(--danger);
            font-size: 12px;
        }

        .error ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .actions {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 28px;
            padding-top: 22px;
            border-top: 1px solid var(--border);
        }

        .btn-primary,
        .btn-secondary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-height: 42px;
            padding: 8px 20px;
            border-radius: 8px;
            font-family: inherit;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition:
                background 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease,
                transform 0.15s ease;
        }

        .btn-primary {
            border: 1px solid var(--primary);
            background: var(--primary);
            color: #fff;
        }

        .btn-primary::before {
            content: "\F26A";
            font-family: "bootstrap-icons";
            font-size: 15px;
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            border-color: var(--primary-dark);
        }

        .btn-secondary {
            border: 1px solid var(--border);
            background: #fff;
            color: var(--text);
        }

        .btn-secondary::before {
            content: "\F12F";
            font-family: "bootstrap-icons";
            font-size: 15px;
            color: var(--primary);
        }

        .btn-secondary:hover {
            border-color: #b9cbd1;
            background: #f8fafb;
            color: var(--primary-dark);
        }

        .btn-primary:active,
        .btn-secondary:active {
            transform: translateY(1px);
        }

        @media (max-width: 768px) {

            .container {
                width: calc(100% - 24px);
                margin: 20px auto;
                padding: 22px 18px;
                border-radius: 11px;
            }

            h1 {
                font-size: 21px;
            }

            .form-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .form-group.full {
                grid-column: auto;
            }

            .actions {
                flex-direction: column;
                align-items: stretch;
            }

            .btn-primary,
            .btn-secondary {
                width: 100%;
            }
        }

        @media (max-width: 480px) {

            .container {
                width: calc(100% - 16px);
                margin: 12px auto;
                padding: 18px 14px;
            }

            .user-info {
                flex-wrap: wrap;
            }
        }

    /* چیدمان دو جدول کنار هم */
    .record-tables {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
        width: 100%;
    }


    /* کارت هر جدول */
    .record-card {
        background: #ffffff;
        border: 1px solid #d9e2e7;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
    }


    /* عنوان بالای جدول */
    .record-card-title {
        padding: 15px 18px;
        background: #f8fafb;
        border-bottom: 1px solid #d9e2e7;

        font-size: 14px;
        font-weight: 700;
        color: #1d2939;

        text-align: right;
    }


    /* حذف فاصله اضافی wrapper اصلی */
    .record-card .table-wrapper {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
    }


    /* خود جدول */
    .record-table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        border-spacing: 0;
    }


    /* هدر */
    .record-table thead th {
        height: 46px;
        padding: 0 16px;

        background: #f4f8fa;
        color: #1d2939;

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

        border-bottom: 1px solid #d9e2e7;

        text-align: right;
        vertical-align: middle;
        white-space: nowrap;
    }


    /* ستون عنوان */
    .record-table thead th:first-child,
    .record-table tbody td:first-child {
        width: 42%;
    }


    /* سلول‌ها */
    .record-table tbody td {
        height: 47px;
        padding: 10px 16px;

        color: #344054;
        font-size: 13px;

        border-bottom: 1px solid #e4eaee;

        text-align: right;
        vertical-align: middle;

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


    /* آخرین ردیف */
    .record-table tbody tr:last-child td {
        border-bottom: 0;
    }


    /* ردیف عنوان */
    .record-table tbody td:first-child {
        font-weight: 600;
        color: #344054;
        background: #fcfdfe;
    }


    /* مقدار */
    .record-table tbody td:last-child {
        color: #475467;
    }


    /* Hover */
    .record-table tbody tr:hover td {
        background: #f8fbfc;
    }


    /* تاریخ */
    .record-date {
        direction: ltr;
        text-align: right !important;
        white-space: nowrap;
    }


    /* توضیحات */
    .record-notes {
        line-height: 1.8;
    }

    .record-notes p {
        margin: 0;
    }


    /* موبایل و صفحه کوچک */
    @media (max-width: 1000px) {

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

    }


    @media (max-width: 768px) {

        .record-tables {
            gap: 15px;
        }

        .record-table thead th,
        .record-table tbody td {
            padding-left: 12px;
            padding-right: 12px;
        }

    }

.dashboard-stat-icon {
    color: #007e9e;
}

.dashboard-stat-icon i {
    color: inherit;
    font-size: 28px;
    line-height: 1;
    font-style: normal;
}
/* =====================================================
   Generator Detail
   ===================================================== */

.generator-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}


/* کارت */
.detail-card {
    width: 100%;
    background: #ffffff;

    border: 1px solid #d9e2e7;
    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);

    overflow: hidden;
}


/* عنوان کارت */
.detail-card-title {
    padding: 14px 18px;

    background: #f6f9fa;

    border-bottom: 1px solid #d9e2e7;

    color: #1d2939;

    font-size: 14px;
    font-weight: 700;

    line-height: 1.8;

    text-align: right;
}


/* جدول */
.detail-table-wrapper {
    width: 100%;
    overflow-x: auto;
}


.detail-table {
    width: 100%;

    border-collapse: collapse;
    border-spacing: 0;

    table-layout: fixed;
}


/* هدر */
.detail-table thead th {
    height: 44px;

    padding: 0 16px;

    background: #f9fbfc;

    border-bottom: 1px solid #d9e2e7;

    color: #344054;

    font-size: 12px;
    font-weight: 700;

    text-align: right;
    vertical-align: middle;

    white-space: nowrap;
}


/* عرض ستون‌ها */
.detail-table th:first-child,
.detail-table td:first-child {
    width: 45%;
}


/* سلول */
.detail-table tbody td {
    min-height: 44px;

    padding: 10px 16px;

    border-bottom: 1px solid #e7ecef;

    color: #475467;

    font-size: 13px;

    line-height: 1.8;

    text-align: right;
    vertical-align: middle;

    overflow-wrap: break-word;
}


/* ستون عنوان */
.detail-table tbody td:first-child {
    color: #344054;
    font-weight: 600;
    background: #fcfdfe;
}


/* آخرین ردیف */
.detail-table tbody tr:last-child td {
    border-bottom: none;
}


/* Hover */
.detail-table tbody tr:hover td {
    background: #f8fbfc;
}


/* مقدار */
.detail-table tbody td:last-child {
    color: #475467;
}


/* =====================================================
   توضیحات
   ===================================================== */

.detail-notes-card {
    margin-top: 20px;
}


.detail-notes {
    padding: 18px;

    color: #475467;

    font-size: 13px;

    line-height: 2;

    white-space: pre-line;
}


.empty-value {
    color: #98a2b3;
}


/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1000px) {

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

}


@media (max-width: 768px) {

    .generator-detail-grid {
        gap: 15px;
    }

    .detail-table thead th,
    .detail-table tbody td {
        padding-left: 12px;
        padding-right: 12px;
    }

    .detail-card-title {
        padding: 12px 14px;
    }

    .detail-notes {
        padding: 14px;
    }

}
/* =========================================================
   Generator Form
   ========================================================= */

.generator-form-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #d9e2e7;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
    overflow: hidden;
}

.generator-form-body {
    padding: 24px;
}


/* ---------------------------------------------------------
   Field
   --------------------------------------------------------- */

.generator-field {
    margin-bottom: 18px;
}

.generator-label {
    display: block;

    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 600;
    color: #344054;

    line-height: 1.8;
}


/* ---------------------------------------------------------
   Text / Number / Select / Textarea
   --------------------------------------------------------- */

.generator-field input:not([type="checkbox"]):not([type="radio"]),
.generator-field select,
.generator-field textarea {
    display: block;

    width: 100%;
    box-sizing: border-box;

    min-height: 40px;

    padding: 8px 12px;

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

    background: #ffffff;

    color: #344054;

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

    line-height: 1.7;

    outline: none;

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


/* Textarea */
.generator-field textarea {
    min-height: 100px;
    resize: vertical;
}


/* Focus */
.generator-field input:not([type="checkbox"]):not([type="radio"]):focus,
.generator-field select:focus,
.generator-field textarea:focus {
    border-color: #007e9e;

    box-shadow:
        0 0 0 3px rgba(0, 126, 158, 0.08);
}


/* ---------------------------------------------------------
   Checkbox
   --------------------------------------------------------- */

.generator-checkbox-field {
    margin-bottom: 13px;
}


/* خود ردیف checkbox */
.generator-checkbox-label {
    display: flex;

    align-items: center;

    width: fit-content;

    gap: 9px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 500;

    color: #344054;

    line-height: 1.8;
}


/* خود تیک */
.generator-checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;

    width: 17px;
    height: 17px;

    min-width: 17px;
    min-height: 17px;

    margin: 0;

    padding: 0;

    border: 1px solid #b8c6ce;
    border-radius: 4px;

    background: #ffffff;

    cursor: pointer;

    position: relative;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}


/* حالت انتخاب شده */
.generator-checkbox-label input[type="checkbox"]:checked {
    background: #007e9e;
    border-color: #007e9e;
}


/* علامت تیک */
.generator-checkbox-label input[type="checkbox"]:checked::after {
    content: "";

    position: absolute;

    width: 4px;
    height: 8px;

    left: 5px;
    top: 2px;

    border: solid #ffffff;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}


/* Focus checkbox */
.generator-checkbox-label input[type="checkbox"]:focus {
    outline: none;

    box-shadow:
        0 0 0 3px rgba(0, 126, 158, 0.10);
}


/* ---------------------------------------------------------
   Help text
   --------------------------------------------------------- */

.generator-help {
    display: block;

    margin-top: 5px;

    color: #667085;

    font-size: 11px;
    line-height: 1.7;
}


/* ---------------------------------------------------------
   Errors
   --------------------------------------------------------- */

.form-error {
    margin-top: 5px;

    color: #d92d20;

    font-size: 12px;
    line-height: 1.7;
}


/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.generator-form-actions {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 24px;

    padding-top: 18px;

    border-top: 1px solid #e4eaee;
}


/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 768px) {

    .generator-form-body {
        padding: 18px;
    }

    .generator-field {
        margin-bottom: 15px;
    }

    .generator-form-actions {
        margin-top: 20px;
    }

}

/* =========================
   Audit Information
========================= */

.audit-info-card {
    margin-bottom: 20px;
}

.audit-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.audit-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.audit-label {
    font-size: 12px;
    color: #667085;
}


/* =========================
   Operation Badge
========================= */

.audit-operation {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 4px 12px;
    border-radius: 6px;

    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.operation-create {
    background: #e8f7ee;
    color: #18794e;
}

.operation-edit {
    background: #fff4d6;
    color: #946200;
}

.operation-delete {
    background: #fdeaea;
    color: #b42318;
}


/* =========================
   Changes
========================= */

.audit-changes-card {
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.audit-changes-table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0;
}

.audit-changes-table th {
    height: 48px;
    padding: 0 18px;

    background: #f5f7f8;
    color: #344054;

    border-bottom: 1px solid #d9e2e7;

    text-align: right;
    font-size: 13px;
    font-weight: 700;
}

.audit-changes-table td {
    padding: 15px 18px;

    border-bottom: 1px solid #e5eaed;

    color: #344054;
    font-size: 13px;

    text-align: right;
    vertical-align: middle;

    word-break: break-word;
}

.audit-changes-table tbody tr:hover {
    background: #f8fafb;
}

.audit-changes-table tbody tr:last-child td {
    border-bottom: none;
}


/* =========================
   Empty Values
========================= */

.empty-value {
    color: #98a2b3;
}

.empty-row {
    text-align: center !important;
    padding: 45px 20px !important;
    color: #667085 !important;
}


/* =========================
   Responsive
========================= */

@media (max-width: 1000px) {

    .audit-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

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

    .page-head {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }

}
/* =====================================================
   Audit Page
   ===================================================== */

.audit-filter-card,
.audit-table-card {

    width: 100%;

    background: #ffffff;

    border: 1px solid #d9e2e7;

    border-radius: 10px;

    box-shadow:
        0 2px 8px rgba(16, 24, 40, 0.04);

    overflow: hidden;

    margin-bottom: 20px;
}


/* =====================================================
   Section Title
   ===================================================== */

.audit-section-title {

    color: #1d2939;

    font-size: 14px;

    font-weight: 700;

    line-height: 1.8;

    text-align: right;
}


.audit-section-title.no-border {
    border-bottom: none;
}


.audit-section-sub {

    margin-top: 2px;

    color: #667085;

    font-size: 11px;

    line-height: 1.8;
}


/* =====================================================
   Filter
   ===================================================== */

.audit-filter-body {

    padding: 18px 20px;
}


.audit-filter-grid {

    display: grid;

    grid-template-columns:
        1.2fr
        1.2fr
        1fr
        1fr
        auto;

    gap: 14px;

    align-items: end;
}


.audit-field {

    display: flex;

    flex-direction: column;

    gap: 6px;
}


.audit-field label {

    color: #344054;

    font-size: 12px;

    font-weight: 600;

    line-height: 1.8;
}


.audit-field select {

    width: 100%;

    min-height: 42px;

    padding: 8px 12px;

    border: 1px solid #d9e2e7;

    border-radius: 8px;

    background: #ffffff;

    color: #344054;

    font-family: inherit;

    font-size: 13px;

    line-height: 1.8;

    outline: none;

    cursor: pointer;
}


.audit-field select:focus {

    border-color: #007e9e;

    box-shadow:
        0 0 0 3px rgba(0, 126, 158, 0.08);
}


.audit-filter-button {

    display: flex;

    align-items: flex-end;
}


.audit-filter-button .btn {

    min-height: 42px;

    white-space: nowrap;
}


/* =====================================================
   Table Header
   ===================================================== */

.audit-table-header {

    padding: 16px 20px;

    border-bottom: 1px solid #d9e2e7;

    background: #ffffff;
}


/* =====================================================
   Audit Table
   ===================================================== */

.audit-table {

    width: 100%;

    min-width: 950px;

    border-collapse: collapse;

    border-spacing: 0;

    table-layout: fixed;
}


.audit-table thead th {

    height: 48px;

    padding: 0 14px;

    background: #f6f9fa;

    border-bottom: 1px solid #d9e2e7;

    color: #344054;

    font-size: 12px;

    font-weight: 700;

    text-align: right;

    vertical-align: middle;

    white-space: nowrap;
}


.audit-table tbody td {

    padding: 12px 14px;

    border-bottom: 1px solid #e7ecef;

    color: #475467;

    font-size: 13px;

    line-height: 1.8;

    text-align: right;

    vertical-align: middle;

    overflow-wrap: break-word;
}


.audit-table tbody tr:last-child td {

    border-bottom: none;
}


.audit-table tbody tr:hover td {

    background: #f8fbfc;
}


/* =====================================================
   Column Widths
   ===================================================== */

.audit-table th:nth-child(1),
.audit-table td:nth-child(1) {
    width: 11%;
}


.audit-table th:nth-child(2),
.audit-table td:nth-child(2) {
    width: 9%;
}


.audit-table th:nth-child(3),
.audit-table td:nth-child(3) {
    width: 12%;
}


.audit-table th:nth-child(4),
.audit-table td:nth-child(4) {
    width: 13%;
}


.audit-table th:nth-child(5),
.audit-table td:nth-child(5) {
    width: 11%;
}


.audit-table th:nth-child(6),
.audit-table td:nth-child(6) {
    width: 17%;
}


.audit-table th:nth-child(7),
.audit-table td:nth-child(7) {
    width: 15%;
}


.audit-table th:nth-child(8),
.audit-table td:nth-child(8) {
    width: 12%;
}


/* =====================================================
   Operation
   ===================================================== */

.audit-operation {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 54px;

    padding: 3px 9px;

    border-radius: 20px;

    font-size: 11px;

    font-weight: 600;

    line-height: 1.7;

    white-space: nowrap;
}


.audit-create {

    background: #ecfdf3;

    color: #067647;
}


.audit-edit {

    background: #fffaeb;

    color: #b54708;
}


.audit-delete {

    background: #fef3f2;

    color: #b42318;
}


/* =====================================================
   Time
   ===================================================== */

.audit-time {

    direction: ltr;

    text-align: right !important;

    white-space: nowrap;
}


/* =====================================================
   Empty
   ===================================================== */

.audit-empty {

    padding: 40px 20px !important;

    color: #98a2b3 !important;

    text-align: center !important;
}


/* =====================================================
   Pagination
   ===================================================== */

.audit-pagination {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 18px;

    border-top: 1px solid #e7ecef;
}


.audit-page-number {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 38px;

    padding: 6px 14px;

    border: 1px solid #d9e2e7;

    border-radius: 8px;

    background: #ffffff;

    color: #475467;

    font-size: 12px;

    line-height: 1.8;

    white-space: nowrap;
}


/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1100px) {

    .audit-filter-grid {

        grid-template-columns:
            1fr
            1fr
            1fr;

    }

    .audit-filter-button {

        grid-column: span 3;
    }

    .audit-filter-button .btn {

        width: 100%;
    }

}


@media (max-width: 650px) {

    .audit-filter-grid {

        grid-template-columns: 1fr;

    }

    .audit-filter-button {

        grid-column: auto;
    }

    .audit-table {

        min-width: 950px;
    }

    .audit-table-header {

        padding: 14px;
    }

    .audit-filter-body {

        padding: 14px;
    }

}

/* =====================================================
   History Page
   ===================================================== */


/* =====================================================
   Filter
   ===================================================== */

.history-filter-card {
    margin-bottom: 20px;
}


.history-filter-grid {

    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        auto;

    gap: 14px;

    align-items: end;
}


.history-filter-item {

    display: flex;

    flex-direction: column;

    gap: 6px;
}


.history-filter-item label {

    color: #344054;

    font-size: 12px;

    font-weight: 600;

    line-height: 1.8;
}


.history-filter-item input,
.history-filter-item select {

    width: 100%;

    min-height: 42px;

    padding: 8px 12px;

    border: 1px solid #d9e2e7;

    border-radius: 8px;

    background: #ffffff;

    color: #344054;

    font-family: inherit;

    font-size: 13px;

    line-height: 1.8;

    outline: none;

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


.history-filter-item input:focus,
.history-filter-item select:focus {

    border-color: #007e9e;

    box-shadow:
        0 0 0 3px rgba(0, 126, 158, 0.08);
}


.history-filter-button {

    display: flex;

    align-items: flex-end;
}


.history-filter-button .btn {

    min-height: 42px;

    white-space: nowrap;
}


/* =====================================================
   Table Card
   ===================================================== */

.history-table-card {

    overflow: hidden;
}


.history-table-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 16px 20px;

    border-bottom: 1px solid #d9e2e7;

    background: #ffffff;
}


.history-section-title {

    color: #1d2939;

    font-size: 14px;

    font-weight: 700;

    line-height: 1.8;
}


.history-section-sub {

    margin-top: 2px;

    color: #667085;

    font-size: 11px;

    line-height: 1.8;
}


/* =====================================================
   History Table
   ===================================================== */

.history-table {

    width: 100%;

    min-width: 850px;

    border-collapse: collapse;

    border-spacing: 0;

    table-layout: fixed;
}


.history-table thead th {

    height: 48px;

    padding: 0 16px;

    background: #f6f9fa;

    border-bottom: 1px solid #d9e2e7;

    color: #344054;

    font-size: 12px;

    font-weight: 700;

    text-align: right;

    vertical-align: middle;

    white-space: nowrap;
}


/* عرض ستون‌ها */

.history-table th:nth-child(1),
.history-table td:nth-child(1) {
    width: 14%;
}


.history-table th:nth-child(2),
.history-table td:nth-child(2) {
    width: 11%;
}


.history-table th:nth-child(3),
.history-table td:nth-child(3) {
    width: 17%;
}


.history-table th:nth-child(4),
.history-table td:nth-child(4) {
    width: 30%;
}


.history-table th:nth-child(5),
.history-table td:nth-child(5) {
    width: 13%;
}


.history-table th:nth-child(6),
.history-table td:nth-child(6) {
    width: 15%;
}


/* Body */

.history-table tbody td {

    padding: 13px 16px;

    border-bottom: 1px solid #e7ecef;

    color: #475467;

    font-size: 13px;

    line-height: 1.8;

    text-align: right;

    vertical-align: middle;

    overflow-wrap: break-word;
}


/* آخرین ردیف */

.history-table tbody tr:last-child td {

    border-bottom: none;
}


/* Hover */

.history-table tbody tr:hover td {

    background: #f8fbfc;
}


/* عنوان */

.history-title-cell {

    color: #344054 !important;

    font-weight: 600;
}


/* توضیحات */

.history-description-cell {

    color: #667085 !important;

    line-height: 1.9;

}


/* تاریخ */

.history-date {

    direction: ltr;

    text-align: right !important;

    white-space: nowrap;
}


/* =====================================================
   Type Pills
   ===================================================== */

.history-pill {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 58px;

    padding: 3px 9px;

    border-radius: 20px;

    font-size: 11px;

    font-weight: 600;

    line-height: 1.7;

    white-space: nowrap;
}


/* شارژر */

.history-pill-charger {

    background: #e7f4f7;

    color: #00677f;
}


/* ژنراتور */

.history-pill-generator {

    background: #fff4e5;

    color: #b54708;
}


/* PM */

.history-pill-pm {

    background: #fef3f2;

    color: #b42318;
}


/* =====================================================
   Empty
   ===================================================== */

.history-empty {

    color: #98a2b3;
}


.history-empty-row {

    padding: 40px 20px !important;

    color: #98a2b3 !important;

    text-align: center !important;

    font-size: 13px !important;
}


/* =====================================================
   Pagination
   ===================================================== */

.history-pagination {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 18px;

    border-top: 1px solid #e7ecef;
}


.history-page-number {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 38px;

    padding: 6px 14px;

    border: 1px solid #d9e2e7;

    border-radius: 8px;

    background: #ffffff;

    color: #475467;

    font-size: 12px;

    line-height: 1.8;

    white-space: nowrap;
}


/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 900px) {

    .history-filter-grid {

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

    .history-filter-button {

        grid-column: span 2;
    }

}


@media (max-width: 600px) {

    .history-filter-grid {

        grid-template-columns: 1fr;
    }

    .history-filter-button {

        grid-column: auto;
    }

    .history-filter-button .btn {

        width: 100%;
    }

    .history-table {

        min-width: 850px;
    }

    .history-table-header {

        padding: 14px;
    }

    .history-pagination {

        padding: 14px;
    }

}

/* =====================================================
   PM Detail Page
   ===================================================== */

.pm-actions {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 8px;

    flex-wrap: wrap;
}


/* =====================================================
   Status Card
   ===================================================== */

.pm-status-card,
.pm-detail-card,
.pm-maintenance-card {

    width: 100%;

    background: #ffffff;

    border: 1px solid #d9e2e7;

    border-radius: 10px;

    box-shadow:
        0 2px 8px rgba(16, 24, 40, 0.04);

    overflow: hidden;

    margin-bottom: 20px;
}


.pm-section-title {

    padding: 14px 18px;

    background: #f6f9fa;

    border-bottom: 1px solid #d9e2e7;

    color: #1d2939;

    font-size: 14px;

    font-weight: 700;

    line-height: 1.8;

    text-align: right;
}


.pm-section-title.no-border {
    border-bottom: none;
}


/* =====================================================
   Status
   ===================================================== */

.pm-status-body {
    padding: 16px;
}


.pm-status {

    border-radius: 8px;

    padding: 13px 16px;

    border: 1px solid;

    line-height: 1.8;
}


.pm-status-title {

    font-size: 13px;

    font-weight: 700;

    margin-bottom: 2px;
}


.pm-status-text {

    font-size: 12px;

    font-weight: 400;
}


/* وضعیت قرمز */

.pm-status-danger {

    background: #fef3f2;

    border-color: #fecdca;

    color: #b42318;
}


/* وضعیت زرد */

.pm-status-warning {

    background: #fffaeb;

    border-color: #fedf89;

    color: #b54708;
}


/* وضعیت سبز */

.pm-status-success {

    background: #ecfdf3;

    border-color: #abefc6;

    color: #067647;
}


/* وضعیت خنثی */

.pm-status-secondary {

    background: #f2f4f7;

    border-color: #d0d5dd;

    color: #475467;
}


/* =====================================================
   Detail Table
   ===================================================== */

.pm-table-wrapper {

    width: 100%;

    overflow-x: auto;
}


.pm-detail-table {

    width: 100%;

    border-collapse: collapse;

    border-spacing: 0;

    table-layout: fixed;
}


.pm-detail-table thead th {

    height: 44px;

    padding: 0 16px;

    background: #f9fbfc;

    border-bottom: 1px solid #d9e2e7;

    color: #344054;

    font-size: 12px;

    font-weight: 700;

    text-align: right;

    vertical-align: middle;

    white-space: nowrap;
}


.pm-detail-table th:first-child,
.pm-detail-table td:first-child {

    width: 42%;
}


.pm-detail-table tbody td {

    min-height: 45px;

    padding: 10px 16px;

    border-bottom: 1px solid #e7ecef;

    color: #475467;

    font-size: 13px;

    line-height: 1.8;

    text-align: right;

    vertical-align: middle;

    overflow-wrap: break-word;
}


.pm-detail-table tbody td:first-child {

    background: #fcfdfe;

    color: #344054;

    font-weight: 600;
}


.pm-detail-table tbody tr:last-child td {

    border-bottom: none;
}


.pm-detail-table tbody tr:hover td {

    background: #f8fbfc;
}


/* =====================================================
   Maintenance Table
   ===================================================== */

.pm-maintenance-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom: 1px solid #d9e2e7;
}


.pm-record-count {

    margin-left: 18px;

    padding: 4px 9px;

    border-radius: 12px;

    background: #eef2f4;

    color: #667085;

    font-size: 11px;

    font-weight: 600;

    white-space: nowrap;
}


.pm-maintenance-table {

    width: 100%;

    border-collapse: collapse;

    border-spacing: 0;

    table-layout: fixed;
}


.pm-maintenance-table thead th {

    height: 46px;

    padding: 0 16px;

    background: #f9fbfc;

    border-bottom: 1px solid #d9e2e7;

    color: #344054;

    font-size: 12px;

    font-weight: 700;

    text-align: right;

    vertical-align: middle;

    white-space: nowrap;
}


.pm-maintenance-table tbody td {

    padding: 11px 16px;

    border-bottom: 1px solid #e7ecef;

    color: #475467;

    font-size: 13px;

    line-height: 1.8;

    text-align: right;

    vertical-align: middle;

}


.pm-maintenance-table tbody tr:last-child td {

    border-bottom: none;
}


.pm-maintenance-table tbody tr:hover td {

    background: #f8fbfc;
}


/* عرض ستون‌ها */

.pm-maintenance-table th:nth-child(1),
.pm-maintenance-table td:nth-child(1) {

    width: 7%;
}


.pm-maintenance-table th:nth-child(2),
.pm-maintenance-table td:nth-child(2) {

    width: 17%;
}


.pm-maintenance-table th:nth-child(3),
.pm-maintenance-table td:nth-child(3) {

    width: 38%;
}


.pm-maintenance-table th:nth-child(4),
.pm-maintenance-table td:nth-child(4) {

    width: 17%;
}


.pm-maintenance-table th:nth-child(5),
.pm-maintenance-table td:nth-child(5) {

    width: 21%;
}


/* شماره ردیف */

.col-number {

    text-align: center !important;

    color: #667085 !important;

    font-weight: 600;
}


/* شرح */

.description-cell {

    white-space: normal;

    word-break: break-word;
}


/* مقدار خالی */

.empty-value {

    color: #98a2b3;
}


/* تاریخ */

.pm-date {

    direction: ltr;

    text-align: right !important;

    white-space: nowrap;
}


/* =====================================================
   Empty
   ===================================================== */

.pm-empty {

    padding: 35px 20px;

    text-align: center;

    color: #98a2b3;

    font-size: 13px;

    line-height: 1.8;
}


/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1000px) {

    .pm-actions {

        justify-content: flex-start;

        margin-top: 10px;
    }

}


@media (max-width: 768px) {

    .pm-section-title {

        padding: 12px 14px;
    }

    .pm-status-body {

        padding: 12px;
    }

    .pm-detail-table thead th,
    .pm-detail-table tbody td,
    .pm-maintenance-table thead th,
    .pm-maintenance-table tbody td {

        padding-left: 12px;

        padding-right: 12px;
    }

    .pm-maintenance-table {

        min-width: 700px;
    }

    .pm-maintenance-header {

        padding-left: 12px;
    }

    .pm-record-count {

        margin-left: 12px;
    }

}

/* =========================================================
   CENTER MANAGEMENT
   مسئول مرکز + ثبت تجهیزات
========================================================= */

.center-management-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(520px, 1.5fr);
    gap: 14px;
    margin-bottom: 16px;
}


/* =========================================================
   SECTION HEADER
========================================================= */

.center-info-header,
.equipment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.section-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 8px;

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

    background: var(--surface-2);
    border: 1px solid var(--border);

    color: var(--accent);
    font-size: 16px;
}

.section-icon-user {
    color: var(--accent);
}

.section-icon-equipment {
    color: var(--accent);
}

.section-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}

.section-description {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 3px;
}


/* =========================================================
   MANAGER INFO
========================================================= */

.manager-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.manager-info-item {
    min-width: 0;

    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;

    padding: 12px 13px;
}

.manager-info-label {
    font-size: 10.5px;
    color: var(--text-faint);
    margin-bottom: 6px;
}

.manager-info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manager-info-value.mono {
    font-family: var(--font-mono);
    direction: ltr;
    text-align: right;
    font-size: 12px;
}

.manager-info-value.empty {
    color: var(--text-faint);
    font-weight: 500;
}


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

.center-info-header .btn {
    flex-shrink: 0;
}


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

.pm-status {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 6px 9px;

    border-radius: 7px;
    background: var(--surface-2);
    border: 1px solid var(--border);

    flex-shrink: 0;
}

.pm-label {
    font-size: 10px;
    color: var(--text-faint);
}

.pm-value {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
}


/* =========================================================
   EQUIPMENT OPTIONS
========================================================= */

.equipment-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.equipment-option {
    display: flex;
    align-items: center;
    gap: 11px;

    min-height: 56px;

    padding: 9px 11px;

    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;

    text-decoration: none;
    color: inherit;

    transition:
        border-color .12s ease,
        background .12s ease,
        transform .12s ease;
}

.equipment-option:hover {
    border-color: var(--accent);
    background: rgba(34, 211, 196, .045);
    transform: translateX(-2px);
}


.equipment-option-icon {
    width: 34px;
    height: 34px;

    flex-shrink: 0;

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

    border-radius: 8px;

    background: var(--surface);
    border: 1px solid var(--border);

    color: var(--accent);
    font-size: 15px;
}


.equipment-option-content {
    min-width: 0;
    flex: 1;
}

.equipment-option-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
}

.equipment-option-description {
    font-size: 10.5px;
    color: var(--text-dim);
    margin-top: 2px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.equipment-option-action {
    display: flex;
    align-items: center;
    gap: 5px;

    flex-shrink: 0;

    font-size: 10.5px;
    font-weight: 600;
    color: var(--accent);

    padding: 5px 8px;

    border-radius: 6px;
    background: rgba(34, 211, 196, .08);
    border: 1px solid rgba(34, 211, 196, .18);
}

.equipment-option-action span {
    font-size: 13px;
    line-height: 1;
}


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

@media (max-width: 900px) {

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

}


@media (max-width: 600px) {

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

    .center-info-header,
    .equipment-header {
        align-items: flex-start;
    }

    .pm-status {
        display: none;
    }

    .equipment-option-action {
        font-size: 0;
        padding: 7px;
    }

    .equipment-option-action span {
        font-size: 15px;
    }

}

.cell-total-row th { background: #eef6ee; font-weight: 700; text-align: center; }

/* ---------- فیلتر PM داشبورد ---------- */
.dashboard-panel-header:has(.pm-filter-form) {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}
.pm-count { font-size: 0.8rem; color: #6b7280; font-weight: 500; margin-inline-start: 6px; }
.pm-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
}
.pm-filter-field { display: flex; align-items: center; gap: 8px; }
.pm-filter-field label { margin: 0; white-space: nowrap; color: #475467; }
.pm-filter-form select {
    width: auto;
    min-width: 150px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
}
.pm-filter-reset { color: #dc2626; text-decoration: none; font-size: 0.8rem; }
.pm-days-over { color: #dc2626; font-weight: 600; }

/* ---------- صفحه‌بندی لیست‌ها (قبلی / شماره صفحه / بعدی) ---------- */
.list-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}


/* =========================================================
   Mobile / Tablet - منوی کشویی (Off-canvas) و ریسپانسیو کلی
   ========================================================= */

.mobile-menu-btn,
.sidebar-overlay {
    display: none;
}

@media (max-width: 900px) {

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

    .app {
        display: block;
    }

    /* منو: کشو از سمت راست (RTL) */
    body .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;

        width: min(290px, 82vw);
        max-height: none;

        transform: translateX(105%);
        transition: transform 0.25s ease;

        border-bottom: none;
        border-left: 1px solid var(--sidebar-border);
        box-shadow: -6px 0 24px rgba(15, 23, 42, 0.18);

        z-index: 1200;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body .sidebar .sidebar-nav {
        flex: 1;
        max-height: none;
        overflow-y: auto;
    }

    body .sidebar .sidebar-footer {
        display: block;
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1100;

        background: rgba(15, 23, 42, 0.45);

        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .main {
        margin-right: 0;
        width: 100%;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 900;

        gap: 10px;
        justify-content: flex-start;
        padding: 6px 0;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 42px;
        height: 42px;
        flex: 0 0 auto;

        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
        color: var(--primary);

        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .topbar-actions {
        margin-inline-start: auto;
    }
}

@media (max-width: 700px) {

    .main-inner {
        padding: 0 12px 30px;
    }

    .page-head,
    .dashboard-header,
    .section-header,
    .dashboard-panel-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* جدول‌ها: اسکرول افقی داخل خود کارت */
    .table-wrapper,
    .table-container,
    .dashboard-table-wrapper,
    .battery-table-wrapper,
    .history-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cell-tables-grid {
        grid-template-columns: 1fr !important;
    }

    .btn {
        max-width: 100%;
        
    }

    img, canvas, svg {
        max-width: 100%;
    }

    .row > [class*="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}