/* =========================================================
   EXPIRESAFE - FINAL DASHBOARD UI
   ========================================================= */

:root {
    --primary: #bf2532;
    --primary-dark: #a91e2b;
    --primary-soft: #fcebed;

    --accent: #ffb200;
    --accent-dark: #e59f00;
    --accent-soft: #fff4d6;

    --success: #198754;
    --success-soft: #e9f6ef;

    --info: #279dc5;
    --info-soft: #e8f7fc;

    --purple: #6558c8;
    --purple-soft: #f0eeff;

    --teal: #278e81;
    --teal-soft: #e8f7f4;

    --text: #24272c;
    --text-secondary: #555b64;
    --text-muted: #8a9099;

    --background: #f6f7f9;
    --surface: #ffffff;
    --border: #e5e7eb;

    --sidebar-width: 210px;
    --header-height: 64px;

    --shadow-sm: 0 2px 8px rgba(20, 28, 40, 0.045);
    --shadow-md: 0 8px 24px rgba(20, 28, 40, 0.07);
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

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

html {
    background: var(--background);
}

body {
    overflow-x: hidden;
    background: var(--background);
    color: var(--text);
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}


/* =========================================================
   APP LAYOUT
   ========================================================= */

.app-wrapper {
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;

    width: var(--sidebar-width);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;
    border-right: 1px solid var(--border);
}

.main-wrapper {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.main-content {
    width: 100%;
    min-width: 0;
    padding: 18px 22px 32px;
}


/* =========================================================
   SIDEBAR BRAND
   ========================================================= */

.sidebar-brand {
    height: var(--header-height);
    flex: 0 0 var(--header-height);

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 0 16px;
    border-bottom: 1px solid var(--border);
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;

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

    border-radius: 10px;

    background: var(--primary);
    color: #ffffff;

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

.brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.brand-name {
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-subtitle {
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   SIDEBAR NAVIGATION
   ========================================================= */

.sidebar-nav {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 10px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #daddE2;
}

.nav-item {
    width: 100%;
    min-height: 40px;

    display: flex;
    align-items: center;
    gap: 10px;

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

    border: 0;
    border-radius: 9px;

    background: transparent;
    color: #5d626a;

    font-size: 11px;
    text-align: left;

    transition: 0.18s ease;
}

.nav-item:hover {
    background: #f6f7f8;
    color: var(--text);
}

.nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.nav-icon {
    width: 19px;
    flex: 0 0 19px;

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

    font-size: 13px;
}

.nav-badge {
    min-width: 19px;
    height: 19px;

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

    margin-left: auto;
    padding: 0 5px;

    border-radius: 20px;

    background: var(--primary);
    color: #ffffff;

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

.nav-new {
    margin-left: auto;
    padding: 3px 5px;

    border-radius: 4px;

    background: var(--accent-soft);
    color: #956400;

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

.nav-arrow {
    margin-left: auto;
    color: #9398a0;
    font-size: 13px;
    transition: transform 0.2s ease;
}

.nav-group.open .nav-arrow {
    transform: rotate(90deg);
}


/* =========================================================
   SIDEBAR SUBMENU
   ========================================================= */

.nav-submenu {
    display: none;

    margin: 3px 0 8px 29px;
    padding-left: 8px;

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

.nav-group.open .nav-submenu {
    display: block;
}

.nav-submenu a {
    display: block;

    margin-bottom: 2px;
    padding: 7px 8px;

    border-radius: 6px;

    color: #737982;
    font-size: 10px;
}

.nav-submenu a:hover {
    background: #f7f7f8;
    color: var(--primary);
}

.submenu-title {
    display: block;

    padding: 7px 8px 4px;

    color: #a0a5ad;

    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.submenu-divider {
    height: 1px;
    margin: 5px 6px;
    background: var(--border);
}


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

.sidebar-footer {
    flex: 0 0 auto;
    padding: 10px 13px 13px;
    border-top: 1px solid var(--border);
}

.quick-links-title {
    display: block;
    margin-bottom: 8px;

    color: #a0a5ad;

    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.quick-links {
    display: flex;
    gap: 6px;
}

.quick-links a {
    width: 30px;
    height: 30px;

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

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

    background: #ffffff;
    color: #777d85;

    font-size: 10px;
}

.quick-links a:hover {
    border-color: #ebc9cd;
    background: var(--primary-soft);
    color: var(--primary);
}


/* =========================================================
   TOP HEADER
   ========================================================= */

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

    width: 100%;
    height: var(--header-height);

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

    padding: 0 18px;

    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    min-width: 0;
    flex: 1;
    gap: 12px;
}

.header-right {
    flex: 0 0 auto;
    gap: 7px;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #626870;

    font-size: 16px;
}

.sidebar-toggle:hover {
    background: #f4f5f6;
}

.header-search {
    width: min(360px, 100%);
    height: 38px;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 0 11px;

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

    background: #fafafb;
}

.header-search:focus-within {
    border-color: #d0d3d8;
    background: #ffffff;
}

.header-search input {
    min-width: 0;
    flex: 1;

    border: 0;
    outline: 0;

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

    font-size: 11px;
}

.header-search input::placeholder {
    color: #a0a5ac;
}

.search-icon {
    color: #858b93;
    font-size: 11px;
}

.search-shortcut {
    padding: 3px 5px;

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

    background: #ffffff;
    color: #999ea6;

    font-size: 8px;
}


/* =========================================================
   HEADER BUTTONS
   ========================================================= */

.new-reminder-btn {
    height: 38px;

    display: flex;
    align-items: center;
    gap: 6px;

    padding: 0 13px;

    border: 0;
    border-radius: 8px;

    background: var(--primary);
    color: #ffffff;

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

.new-reminder-btn:hover {
    background: var(--primary-dark);
}

.plus-icon {
    font-size: 15px;
}

.header-icon-btn {
    position: relative;

    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #656b73;

    font-size: 11px;
}

.header-icon-btn:hover {
    background: #f4f5f6;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;

    width: 7px;
    height: 7px;

    border: 2px solid #ffffff;
    border-radius: 50%;

    background: var(--primary);
}

.header-divider {
    width: 1px;
    height: 27px;
    margin: 0 2px;
    background: var(--border);
}


/* =========================================================
   HEADER PROFILE / WORKSPACE
   ========================================================= */

.header-dropdown {
    position: relative;
}

.workspace-btn,
.profile-btn {
    height: 42px;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 3px 7px;

    border: 0;
    border-radius: 8px;

    background: transparent;
}

.workspace-btn:hover,
.profile-btn:hover {
    background: #f6f7f8;
}

.workspace-icon,
.profile-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;

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

    border-radius: 8px;

    background: var(--accent-soft);
    color: #936200;

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

.profile-avatar {
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
}

.profile-avatar.large {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.workspace-info,
.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.workspace-info small,
.profile-info small {
    margin-bottom: 2px;
    color: #999ea6;
    font-size: 8px;
}

.workspace-info strong,
.profile-info strong {
    color: #33373c;
    font-size: 10px;
    font-weight: 600;
}

.dropdown-arrow {
    color: #92979f;
    font-size: 8px;
}


/* =========================================================
   HEADER DROPDOWNS
   ========================================================= */

.header-dropdown-menu {
    display: none;

    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1100;

    min-width: 210px;

    padding: 7px;

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

    background: #ffffff;

    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.11);
}

.header-dropdown.open .header-dropdown-menu {
    display: block;
}

.new-reminder-menu {
    width: 270px;
}

.header-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 9px 10px;

    border-radius: 8px;

    color: var(--text);
}

.header-dropdown-menu a:hover {
    background: #f6f7f8;
}

.header-dropdown-menu a strong,
.header-dropdown-menu a small {
    display: block;
}

.header-dropdown-menu a strong {
    margin-bottom: 2px;
    font-size: 10px;
}

.header-dropdown-menu a small {
    color: var(--text-muted);
    font-size: 8px;
}

.menu-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;

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

    border-radius: 8px;
}

.expiration-icon {
    background: var(--primary-soft);
    color: var(--primary);
}

.due-icon {
    background: var(--accent-soft);
    color: #9a6800;
}

.appointment-icon {
    background: var(--info-soft);
    color: var(--info);
}

.event-icon {
    background: var(--purple-soft);
    color: var(--purple);
}

.upload-icon {
    background: var(--success-soft);
    color: var(--success);
}

.dropdown-divider {
    height: 1px;
    margin: 5px;
    background: var(--border);
}

.dropdown-label {
    display: block;

    padding: 6px 9px;

    color: #999ea6;

    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.workspace-menu a {
    justify-content: space-between;
    font-size: 10px;
}

.workspace-menu a.selected {
    background: var(--primary-soft);
    color: var(--primary);
}

.profile-menu {
    width: 220px;
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.profile-menu-header div {
    display: flex;
    flex-direction: column;
}

.profile-menu-header strong {
    font-size: 11px;
}

.profile-menu-header small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 8px;
}

.profile-menu > a {
    font-size: 10px;
}

.profile-menu .logout-link {
    color: var(--primary);
}


/* =========================================================
   DASHBOARD BASE
   ========================================================= */

.dashboard-page {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0 ;
}


/* =========================================================
   DASHBOARD PAGE HEADER
   ========================================================= */

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

    margin-bottom: 12px;
}

.dashboard-page-header h1 {
    margin: 0 0 3px;

    color: var(--text);

    font-size: 25px;
    line-height: 1.15;
    font-weight: 700;
}

.dashboard-page-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 10px;
}

.smart-doc-btn {
    min-height: 42px;
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 6px 13px;

    border: 0;
    border-radius: 23px;

    background: linear-gradient(135deg, var(--primary), #d83b48);
    color: #ffffff;

    box-shadow: 0 7px 18px rgba(191, 37, 50, 0.18);
}

.smart-doc-star {
    font-size: 15px;
}

.smart-doc-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.smart-doc-copy small {
    font-size: 7px;
    letter-spacing: 0.8px;
    opacity: 0.8;
}

.smart-doc-copy strong {
    font-size: 10px;
}


/* =========================================================
   COMPACT EXPIRESAFE HERO
   ========================================================= */

.expiresafe-hero {
    position: relative;

    min-height: 150px;

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

    overflow: hidden;

    margin-bottom: 10px;

    border: 1px solid #f1dca5;
    border-radius: 16px;

    background:
        radial-gradient(
            circle at 84% 18%,
            rgba(255, 178, 0, 0.16),
            transparent 29%
        ),
        linear-gradient(
            120deg,
            #ffffff 0%,
            #fffdf8 51%,
            #fff4d3 100%
        );

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

.hero-content {
    position: relative;
    z-index: 2;

    width: 67%;

    padding: 20px 28px;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 8px;

    color: var(--primary);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.hero-brand-mark {
    width: 22px;
    height: 22px;

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

    border-radius: 7px;

    background: var(--primary);
    color: #ffffff;

    font-size: 10px;
}

.hero-content h2 {
    margin: 0 0 5px;

    color: #292a2e;

    font-size: 23px;
    line-height: 1.15;
    font-weight: 700;
}

.hero-content p {
    max-width: 640px;

    margin: 0;

    color: #73777d;

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

.hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-top: 13px;
}

.hero-primary-btn,
.hero-secondary-btn {
    min-height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 0 13px;

    border-radius: 8px;

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

.hero-primary-btn {
    background: var(--primary);
    color: #ffffff;

    box-shadow: 0 5px 12px rgba(191, 37, 50, 0.14);
}

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

.hero-primary-btn span {
    font-size: 14px;
}

.hero-secondary-btn {
    border: 1px solid #e8d7a9;
    background: rgba(255, 255, 255, 0.8);
    color: #6d6040;
}

.hero-secondary-btn:hover {
    background: #ffffff;
}


/* =========================================================
   HERO VISUAL
   ========================================================= */

.hero-visual {
    position: relative;

    width: 33%;
    min-width: 300px;

    overflow: hidden;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
}

.hero-circle-one {
    width: 220px;
    height: 220px;

    top: -75px;
    right: -25px;

    border: 1px solid rgba(191, 37, 50, 0.08);
    background: rgba(255, 255, 255, 0.25);
}

.hero-circle-two {
    width: 150px;
    height: 150px;

    right: 28px;
    bottom: -80px;

    border: 1px solid rgba(255, 178, 0, 0.2);
}

.hero-shield {
    position: absolute;
    top: 19px;
    right: 112px;

    width: 75px;
    height: 86px;

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

    clip-path: polygon(
        50% 0%,
        92% 16%,
        92% 54%,
        78% 78%,
        50% 100%,
        22% 78%,
        8% 54%,
        8% 16%
    );

    background: linear-gradient(145deg, #ffbd26, #f2a100);
    color: #ffffff;

    filter: drop-shadow(0 9px 12px rgba(230, 157, 0, 0.17));

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

.hero-mini-card {
    position: absolute;
    z-index: 3;

    min-width: 108px;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 7px 9px;

    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 9px;

    background: rgba(255, 255, 255, 0.94);

    box-shadow: 0 7px 20px rgba(30, 35, 45, 0.09);
}

.hero-mini-card-one {
    top: 20px;
    right: 18px;
}

.hero-mini-card-two {
    right: 190px;
    bottom: 15px;
}

.hero-mini-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;

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

    border-radius: 7px;

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

.hero-mini-icon.red {
    background: var(--primary-soft);
    color: var(--primary);
}

.hero-mini-icon.green {
    background: var(--success-soft);
    color: var(--success);
}

.hero-mini-card strong,
.hero-mini-card small {
    display: block;
}

.hero-mini-card strong {
    color: var(--text);
    font-size: 12px;
}

.hero-mini-card small {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 7px;
}


/* =========================================================
   DASHBOARD SHORTCUTS
   ========================================================= */

.dashboard-shortcuts {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 10px;
}

.dashboard-shortcut {
    min-height: 35px;
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 5px 12px;

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

    background: #ffffff;
    color: var(--text-secondary);

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

    font-size: 9px;
    font-weight: 600;

    transition: 0.18s ease;
}

.dashboard-shortcut:hover {
    border-color: #e9c9cd;
    color: var(--primary);
    transform: translateY(-1px);
}

.shortcut-box {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;

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

    border-radius: 7px;

    font-size: 9px;
}

.shortcut-box.explorer {
    background: var(--accent-soft);
    color: #986500;
}

.shortcut-box.calendar-shortcut,
.shortcut-box.calendar {
    background: var(--info-soft);
    color: var(--info);
}

.shortcut-box.tasks {
    background: var(--success-soft);
    color: var(--success);
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.dashboard-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;

    margin: 15px 0 7px;
}

.dashboard-section-heading.quick-heading {
    margin-top: 0;
}

.dashboard-section-heading.overview-heading {
    margin-top: 15px;
}

.dashboard-section-heading h2 {
    margin: 0 0 2px;

    color: var(--text);

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

.dashboard-section-heading p {
    margin: 0;

    color: var(--text-muted);

    font-size: 9px;
}

.dashboard-section-heading > a {
    flex: 0 0 auto;

    color: var(--primary);

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


/* =========================================================
   QUICK ACTIONS
   ========================================================= */

.quick-actions-grid {
    width: 100%;

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

    gap: 10px;
}

.quick-action {
    min-width: 0;
    min-height: 62px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 9px 11px;

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

    background: #ffffff;

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

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

.quick-action:hover {
    transform: translateY(-2px);
    border-color: #dadddf;
    box-shadow: var(--shadow-md);
}

.quick-action > div {
    min-width: 0;
    flex: 1;
}

.quick-action strong,
.quick-action small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-action strong {
    margin-bottom: 3px;
    color: var(--text);
    font-size: 10px;
}

.quick-action small {
    color: var(--text-muted);
    font-size: 8px;
}

.quick-icon {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;

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

    border-radius: 9px;

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

.quick-icon.red {
    background: var(--primary-soft);
    color: var(--primary);
}

.quick-icon.yellow {
    background: var(--accent-soft);
    color: #9b6800;
}

.quick-icon.blue {
    background: var(--info-soft);
    color: var(--info);
}

.quick-icon.green {
    background: var(--success-soft);
    color: var(--success);
}

.quick-arrow {
    flex: 0 0 auto;
    color: #b2b5ba;
    font-size: 16px;
}


/* =========================================================
   DOCUMENT OVERVIEW
   ========================================================= */

.summary-grid {
    width: 100%;
    min-width: 0;

    display: grid;

    /*
     * Keep all seven cards on one row on a normal desktop.
     * minmax(0, 1fr) prevents numbers/text from forcing overflow.
     */
    grid-template-columns: repeat(7, minmax(0, 1fr));

    gap: 9px;

    margin-bottom: 10px;
}

.summary-card {
    position: relative;

    min-width: 0;
    height: 120px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    padding: 11px;

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

    background: #ffffff;

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

.summary-icon-wrap {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;

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

    margin-bottom: 7px;

    border-radius: 8px;

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

.summary-content {
    position: relative;
    z-index: 2;

    min-width: 0;

    display: flex;
    flex: 1;
    flex-direction: column;
}

.summary-label {
    display: block;

    max-width: 100%;
    overflow: hidden;

    margin-bottom: 3px;

    font-size: 7px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.25px;

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

.summary-number {
    display: block;

    max-width: 100%;
    overflow: hidden;

    color: inherit;

    font-size: clamp(24px, 2vw, 30px);
    line-height: 1;
    font-weight: 700;

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

.summary-description {
    display: block;

    margin-top: auto;
    padding-top: 5px;

    max-width: 100%;
    overflow: hidden;

    color: inherit;

    font-size: 7px;
    line-height: 1.2;

    opacity: 0.72;

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

.summary-trend {
    position: absolute;
    top: 9px;
    right: 8px;
    z-index: 3;

    max-width: 55px;

    overflow: hidden;

    padding: 3px 5px;

    border-radius: 20px;

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

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

.summary-trend.danger {
    background: #ffffff;
    color: var(--primary);
}

.summary-trend.purple {
    background: #ffffff;
    color: var(--purple);
}

.summary-trend.warning {
    background: #ffffff;
    color: #986500;
}


/* Expired */

.expired-card {
    border-color: #f0c8cd;

    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #fff1f3 100%
    );

    color: var(--primary);
}

.expired-card .summary-icon-wrap {
    background: var(--primary);
    color: #ffffff;
}


/* Completed */

.completed-card {
    border-color: #ddd8f5;

    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #f2f0ff 100%
    );

    color: var(--purple);
}

.completed-card .summary-icon-wrap {
    background: var(--purple);
    color: #ffffff;
}


/* Compliance */

.compliance-card {
    border-color: #cfe9da;

    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #edf9f2 100%
    );

    color: var(--success);
}

.compliance-card .summary-icon-wrap {
    background: var(--success);
    color: #ffffff;
}

.mini-progress {
    width: 100%;
    height: 4px;

    overflow: hidden;

    margin-top: 5px;

    border-radius: 20px;

    background: #d6ebdf;
}

.mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--success);
}


/* Pending */

.pending-card {
    border-color: #f1deaf;

    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #fff8e7 100%
    );

    color: #986500;
}

.pending-card .summary-icon-wrap {
    background: var(--accent);
    color: #ffffff;
}


/* Two Weeks */

.weeks-card {
    border: 0;

    background: linear-gradient(
        135deg,
        #f29b00 0%,
        #ffb200 100%
    );

    color: #ffffff;
}

.weeks-card .summary-icon-wrap {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}


/* Two Months */

.months-card {
    border: 0;

    background: linear-gradient(
        135deg,
        #278e81 0%,
        #3eb5a6 100%
    );

    color: #ffffff;
}

.months-card .summary-icon-wrap {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}


/* Total */

.total-card {
    border: 0;

    background: linear-gradient(
        135deg,
        #5261d5 0%,
        #695cd3 100%
    );

    color: #ffffff;
}

.total-card .summary-icon-wrap {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.summary-decoration {
    position: absolute;
    top: -45px;
    right: -42px;

    width: 115px;
    height: 115px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.05);
}


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

.status-grid {
    width: 100%;

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

    gap: 9px;

    margin-bottom: 12px;
}

.status-card {
    position: relative;

    min-width: 0;
    min-height: 58px;

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

    overflow: hidden;

    padding: 8px 11px;

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

    background: #ffffff;

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

.status-card::before {
    content: "";

    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;

    width: 3px;
}

.status-card.upcoming::before {
    background: var(--teal);
}

.status-card.process::before {
    background: var(--purple);
}

.status-card.archived::before {
    background: var(--success);
}

.status-card.inactive::before {
    background: var(--accent);
}

.status-left {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 8px;
}

.status-left > div {
    min-width: 0;
}

.status-left strong,
.status-left small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-left strong {
    margin-bottom: 2px;
    color: var(--text);
    font-size: 9px;
}

.status-left small {
    color: var(--text-muted);
    font-size: 7px;
}

.status-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;

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

    border-radius: 8px;

    font-size: 9px;
}

.upcoming .status-icon {
    background: var(--teal-soft);
    color: var(--teal);
}

.process .status-icon {
    background: var(--purple-soft);
    color: var(--purple);
}

.archived .status-icon {
    background: var(--success-soft);
    color: var(--success);
}

.inactive .status-icon {
    background: var(--accent-soft);
    color: #986500;
}

.status-number {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 700;
}

.upcoming .status-number {
    color: var(--teal);
}

.process .status-number {
    color: var(--purple);
}

.archived .status-number {
    color: var(--success);
}

.inactive .status-number {
    color: #a36d00;
}


/* =========================================================
   CALENDAR + ATTENTION
   ========================================================= */

.dashboard-content-grid {
    width: 100%;
    min-width: 0;

    display: grid;

    grid-template-columns:
        minmax(0, 1.18fr)
        minmax(350px, 0.82fr);

    align-items: start;

    gap: 12px;
}

.dashboard-panel {
    min-width: 0;

    overflow: hidden;

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

    background: #ffffff;

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

.panel-header {
    min-height: 60px;

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

    padding: 11px 14px;

    border-bottom: 1px solid #ecedef;
}

.panel-header > div {
    min-width: 0;
}

.panel-header h2,
.attention-title h2 {
    margin: 0 0 3px;

    color: var(--text);

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

.panel-header p,
.attention-title p {
    margin: 0;
    color: var(--text-muted);
    font-size: 8px;
}

.panel-header > a {
    flex: 0 0 auto;

    color: var(--primary);

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


/* =========================================================
   CALENDAR CONTROLS
   ========================================================= */

.calendar-controls {
    min-height: 52px;

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

    padding: 8px 13px;
}

.calendar-month {
    display: flex;
    align-items: center;
    gap: 7px;
}

.calendar-month strong {
    min-width: 100px;

    color: #3b3f45;

    text-align: center;

    font-size: 10px;
}

.calendar-month button {
    width: 26px;
    height: 26px;

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

    background: #ffffff;
    color: #727780;

    font-size: 12px;
}

.calendar-month button:hover {
    background: #f6f7f8;
}

.calendar-tabs {
    display: flex;

    padding: 3px;

    border-radius: 8px;

    background: #f4f5f7;
}

.calendar-tabs button {
    padding: 6px 8px;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #858a92;

    font-size: 7px;
}

.calendar-tabs button.active {
    background: #ffffff;
    color: var(--primary);

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);

    font-weight: 600;
}


/* =========================================================
   CALENDAR LEGEND
   ========================================================= */

.calendar-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    padding: 0 13px 9px;

    color: #7d8289;

    font-size: 7px;
}

.calendar-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-dot {
    width: 6px;
    height: 6px;

    display: inline-block;

    border-radius: 50%;
}

.legend-dot.expired {
    background: var(--primary);
}

.legend-dot.due {
    background: var(--accent);
}

.legend-dot.reminder {
    background: var(--info);
}

.legend-dot.completed {
    background: var(--success);
}


/* =========================================================
   CALENDAR GRID
   ========================================================= */

.calendar-grid {
    width: 100%;

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

    padding: 0 13px 13px;
}

.calendar-head {
    min-width: 0;

    padding: 8px 3px;

    background: #f7f8fa;
    color: #8c929a;

    text-align: center;

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

.calendar-cell {
    position: relative;

    min-width: 0;
    height: 59px;

    overflow: hidden;

    padding: 6px;

    border-right: 1px solid #ecedef;
    border-bottom: 1px solid #ecedef;

    background: #ffffff;
    color: #535860;

    font-size: 8px;
}

.calendar-cell:nth-child(7n) {
    border-right: 0;
}

.calendar-cell.muted {
    background: #fbfbfc;
    color: #b9bdc3;
}

.calendar-cell.active-day {
    background: #fff8e5;
}

.calendar-cell > span:first-child {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.calendar-event {
    width: 100%;
    max-width: 100%;

    display: flex;
    align-items: center;
    gap: 3px;

    overflow: hidden;

    padding: 3px 4px;

    border-radius: 4px;

    font-size: 6px;
    font-weight: 600;

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

.calendar-event i {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;

    border-radius: 50%;
}

.red-event {
    background: var(--primary-soft);
    color: var(--primary);
}

.red-event i {
    background: var(--primary);
}

.yellow-event {
    background: var(--accent-soft);
    color: #946200;
}

.yellow-event i {
    background: var(--accent);
}

.green-event {
    background: var(--success-soft);
    color: var(--success);
}

.green-event i {
    background: var(--success);
}

.blue-event {
    background: var(--info-soft);
    color: var(--info);
}

.blue-event i {
    background: var(--info);
}


/* =========================================================
   URGENT ATTENTION
   ========================================================= */

.attention-panel {
    align-self: start;
}

.attention-heading {
    min-height: 60px;

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

    padding: 10px 13px;

    border-bottom: 1px solid #ecedef;
}

.attention-title {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 8px;
}

.attention-title > div {
    min-width: 0;
}

.attention-alert {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;

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

    border-radius: 8px;

    background: var(--primary-soft);
    color: var(--primary);

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

.attention-filters {
    flex: 0 0 auto;

    display: flex;
    gap: 3px;
}

.attention-filters button {
    padding: 5px 6px;

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

    background: #ffffff;
    color: #777d85;

    font-size: 6px;
}

.attention-filters button.active {
    border-color: #eec9cd;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.attention-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;

    margin: 10px 13px 8px;
    padding: 9px 11px;

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

    background: #fff9e9;
}

.attention-summary-row > div {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 8px;
}

.attention-summary-row strong {
    flex: 0 0 auto;

    color: var(--primary);

    font-size: 18px;
}

.attention-summary-row span {
    color: #747980;
    font-size: 8px;
}

.attention-summary-row span b {
    color: #4c5056;
}

.attention-summary-row > a {
    flex: 0 0 auto;

    color: var(--primary);

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

.attention-table-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;

    padding: 7px 13px;

    border-top: 1px solid #ecedef;
    border-bottom: 1px solid #ecedef;

    background: #fafafb;
    color: #969ba2;

    font-size: 6px;
    font-weight: 700;
    letter-spacing: 0.25px;
}

.attention-list {
    padding: 0 13px;
}

.attention-item {
    min-width: 0;

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

    padding: 10px 0;

    border-bottom: 1px solid #ecedef;
}

.attention-item-main {
    min-width: 0;
    flex: 1;

    display: flex;
    align-items: center;
    gap: 8px;
}

.attention-item-main > div {
    min-width: 0;
}

.attention-item-main strong,
.attention-item-main div > span {
    display: block;

    overflow: hidden;

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

.attention-item-main strong {
    margin-bottom: 2px;

    color: #33373c;

    font-size: 9px;
}

.attention-item-main div > span {
    color: #91969e;
    font-size: 7px;
}

.document-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;

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

    border-radius: 8px;

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

.document-icon.red {
    background: var(--primary-soft);
    color: var(--primary);
}

.document-icon.yellow {
    background: var(--accent-soft);
    color: #986500;
}

.document-icon.blue {
    background: var(--info-soft);
    color: var(--info);
}

.document-icon.green {
    background: var(--success-soft);
    color: var(--success);
}

.attention-date {
    flex: 0 0 auto;

    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 2px;
}

.attention-date small {
    color: #9a9ea5;
    font-size: 6px;
}

.date-badge {
    padding: 4px 6px;

    border-radius: 15px;

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

.date-badge.danger {
    background: var(--primary-soft);
    color: var(--primary);
}

.date-badge.warning {
    background: var(--accent-soft);
    color: #966300;
}

.date-badge.safe {
    background: var(--success-soft);
    color: var(--success);
}

.attention-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 9px 13px;

    background: #fafafb;
}

.attention-footer span {
    color: #92979f;
    font-size: 6px;
}

.attention-footer a {
    flex: 0 0 auto;

    color: var(--primary);

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


/* =========================================================
   COMMON BUTTONS
   ========================================================= */

.btn {
    min-height: 36px;

    padding: 0 13px;

    border: 1px solid transparent;
    border-radius: 8px;

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

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

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

.btn-secondary {
    border-color: var(--border);
    background: #ffffff;
    color: var(--text);
}


/* =========================================================
   TABLES
   ========================================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 10px 12px;

    border-bottom: 1px solid #ecedef;

    text-align: left;
    white-space: nowrap;
}

.dashboard-table th {
    background: #fafafb;
    color: #898f97;

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

.dashboard-table td {
    color: #555b63;
    font-size: 9px;
}


/* =========================================================
   COLLAPSED SIDEBAR
   ========================================================= */

body.sidebar-collapsed {
    --sidebar-width: 70px;
}

body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-item > span:not(.nav-icon),
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .nav-new,
body.sidebar-collapsed .nav-arrow,
body.sidebar-collapsed .nav-submenu,
body.sidebar-collapsed .quick-links-title {
    display: none;
}

body.sidebar-collapsed .nav-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .nav-icon {
    width: 31px;
    flex-basis: 31px;
}

body.sidebar-collapsed .quick-links {
    align-items: center;
    flex-direction: column;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1500px) {

    .main-content {
        padding-left: 26px;
        padding-right: 26px;
    }

    .summary-card {
        height: 126px;
    }

    .calendar-cell {
        height: 63px;
    }
}


/* =========================================================
   NORMAL LAPTOP / DESKTOP
   ========================================================= */

@media (max-width: 1280px) {

    .main-content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .summary-grid {
        gap: 7px;
    }

    .summary-card {
        padding: 9px;
    }

    .summary-number {
        font-size: 24px;
    }

    .summary-trend {
        display: none;
    }

    .hero-mini-card-two {
        right: 165px;
    }
}


/* =========================================================
   SMALL LAPTOP
   ========================================================= */

@media (max-width: 1100px) {

    .workspace-info {
        display: none;
    }

    .hero-content {
        width: 70%;
    }

    .hero-visual {
        width: 30%;
        min-width: 250px;
    }

    .hero-mini-card-two {
        display: none;
    }

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

    .summary-card {
        height: 118px;
    }

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

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


/* =========================================================
   MOBILE SIDEBAR MODE
   ========================================================= */

@media (max-width: 950px) {

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

    .sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.08);
        transition: transform 0.25s ease;
    }

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

    .main-wrapper,
    body.sidebar-collapsed .main-wrapper {
        width: 100%;
        margin-left: 0;
    }

    .profile-info,
    .search-shortcut {
        display: none;
    }

    .hero-mini-card {
        display: none;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 768px) {

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

    .main-content {
        padding: 14px 12px 28px;
    }

    .header-search {
        max-width: 230px;
    }

    .workspace-btn,
    .header-icon-btn {
        display: none;
    }

    .new-reminder-btn {
        padding: 0 10px;
    }

    .dashboard-page-header {
        align-items: flex-start;
    }

    .smart-doc-btn {
        display: none;
    }

    .expiresafe-hero {
        min-height: auto;
    }

    .hero-content {
        width: 100%;
        padding: 20px;
    }

    .hero-content h2 {
        font-size: 21px;
    }

    .hero-visual {
        display: none;
    }

    .dashboard-shortcuts {
        overflow-x: auto;
        padding-bottom: 2px;
    }

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

    .summary-card {
        height: 120px;
    }

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

    .calendar-controls {
        align-items: flex-start;
        flex-direction: column;
    }

    .calendar-tabs {
        width: 100%;
    }

    .calendar-tabs button {
        flex: 1;
    }

    .attention-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .attention-filters {
        width: 100%;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {

    .header-search {
        display: none;
    }

    .new-reminder-btn span:not(.plus-icon) {
        display: none;
    }

    .dashboard-page-header h1 {
        font-size: 21px;
    }

    .hero-content {
        padding: 18px;
    }

    .hero-content h2 {
        font-size: 19px;
    }

    .hero-content p {
        font-size: 10px;
    }

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

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

    .quick-actions-grid,
    .summary-grid,
    .status-grid {
        grid-template-columns: 1fr;
    }

    .summary-card {
        height: 118px;
    }

    .calendar-cell {
        height: 52px;
        padding: 4px;
    }

    .calendar-event {
        padding: 2px;
        font-size: 0;
    }

    .calendar-event i {
        width: 6px;
        height: 6px;
        flex-basis: 6px;
    }

    .attention-summary-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .attention-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* ExpireSafe 3D Hero Shield */
.hero-shield-image {
    position: absolute;
    top: 8px;
    right: 65px;
    width: 220px;
    height: 200px;

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

    z-index: 2;
    pointer-events: none;
}

.hero-shield-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Hero 3D visual final positioning */
.hero-shield-image {
    top: 4px;
    right: 72px;
    width: 205px;
    height: 155px;
}

.hero-mini-card-one {
    top: 20px;
    right: 18px;
    z-index: 4;
}

.hero-mini-card-two {
    left: auto;
    right: 205px;
    bottom: 15px;
    z-index: 4;
}

.department-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0px;
}

@media (max-width: 1100px) {
    .department-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .department-overview-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Departments - List Section
========================================================= */

.department-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 20px;
}

.department-add-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;

    color: #ffffff;
    font-family: inherit;
    font-size: 9px;
    font-weight: 600;

    cursor: pointer;

    background: #bf2532;
    border: 1px solid #bf2532;
    border-radius: 7px;

    box-shadow: 0 4px 10px rgba(191, 37, 50, 0.12);
}

.department-add-btn:hover {
    background: #aa1f2c;
    border-color: #aa1f2c;
}

.department-add-btn span {
    font-size: 9px;
}

.department-add-btn svg {
    width: 13px;
    height: 13px;
}
.departments-panel {
    margin-top: 18px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: 0 3px 14px rgba(24, 28, 38, 0.04);
}

.departments-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.departments-panel-header h2 {
    margin: 0 0 4px;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.departments-panel-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 11px;
}

.department-search {
    width: 240px;
    height: 36px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafafa;
}

.department-search > span {
    color: var(--text-muted);
    font-size: 13px;
}

.department-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 11px;
}

.department-search input::placeholder {
    color: #9b9b9b;
}


/* Department Cards */

.department-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-top: 18px;
}

.department-card {
    min-width: 0;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: 0.2s ease;
}

.department-card:hover {
    border-color: #dedede;
    box-shadow: 0 7px 22px rgba(24, 28, 38, 0.07);
    transform: translateY(-2px);
}

.department-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.department-name {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.department-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
}

.department-icon.tech {
    background: #e9f7f5;
    color: #16897d;
}

.department-icon.accounts {
    background: #fff4d6;
    color: #b97900;
}

.department-icon.support {
    background: #f0edff;
    color: #6555c7;
}

.department-name > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.department-name strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.department-name div span {
    color: var(--text-muted);
    font-size: 10px;
}

.department-menu {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #888;
    font-family: inherit;
    cursor: pointer;
}

.department-menu:hover {
    background: #f5f5f5;
}


/* Department Statistics */

.department-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
    overflow: hidden;
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 9px;
}

.department-stats > div {
    min-width: 0;
    padding: 11px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    border-right: 1px solid #eeeeee;
}

.department-stats > div:last-child {
    border-right: 0;
}

.department-stats strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.department-stats span {
    color: var(--text-muted);
    font-size: 9px;
}

.department-stats .department-danger strong {
    color: var(--danger);
}

.department-stats .department-warning strong {
    color: #d58a00;
}


/* Department Footer */

.department-card-footer {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.department-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
}

.department-status::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.department-status.active {
    color: var(--success);
    background: var(--success-soft);
}

.department-status.active::before {
    background: var(--success);
}

.department-card-footer a {
    color: var(--primary);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
}

.department-card-footer a:hover {
    text-decoration: underline;
}


/* Responsive */

@media (max-width: 1100px) {
    .department-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 720px) {
    .department-overview-grid,
    .department-list {
        grid-template-columns: 1fr;
    }

    .departments-panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .department-search {
        width: 100%;
    }
}

/* Active Manage section */
.nav-group.open > .nav-toggle.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

/* Active submenu page */
.nav-submenu a.active {
    position: relative;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
    border-radius: 7px;
}

.nav-submenu a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}

/* Keep Manage arrow rotated while its page is active */
.nav-group.open > .nav-toggle .nav-arrow {
    transform: rotate(90deg);
}

/* Department View link */
.department-card-footer a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.department-card-footer a svg {
    width: 13px;
    height: 13px;
    stroke-width: 2;
    flex-shrink: 0;
}

/* KPI card status badges */
.summary-card {
    position: relative;
}

.summary-card .summary-trend {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;

    width: auto;
    min-width: max-content;
    max-width: none;
    height: auto;

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

    padding: 4px 8px;
    border-radius: 20px;

    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;

    overflow: visible;
    text-overflow: clip;
    z-index: 5;
}

.summary-card .summary-trend.danger {
    color: #BF2532;
    background: #FBEAEC;
}

.summary-card .summary-trend.warning {
    color: #B77900;
    background: #FFF4D6;
}

.summary-card .summary-trend.purple {
    color: #6254C7;
    background: #EFEDFF;
}

/* =========================================================
   ADD DEPARTMENT MODAL
========================================================= */

.department-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.department-modal.show {
    display: flex;
}

.department-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    backdrop-filter: blur(2px);
}

.department-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 570px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.18);
}


/* Header */

.department-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid #eeeeee;
}

.department-modal-title {
    display: flex;
    align-items: center;
    gap: 13px;
}

.department-modal-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #bf2532;
    background: #fbeaec;
}

.department-modal-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.9;
}

.department-modal-title h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #252525;
}

.department-modal-title p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #737373;
}

.department-modal-close {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #737373;
    cursor: pointer;
    transition: 0.2s ease;
}

.department-modal-close:hover {
    color: #bf2532;
    background: #fbeaec;
}

.department-modal-close svg {
    width: 18px;
    height: 18px;
}


/* Body */

.department-modal-body {
    padding: 24px;
}

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

.department-form-group {
    margin-bottom: 18px;
}

.department-form-group:last-child {
    margin-bottom: 0;
}

.department-form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #333333;
}

.department-form-group label > span {
    color: #bf2532;
}

.department-form-group input,
.department-form-group textarea,
.department-form-group select {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 12px;
    color: #252525;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 9px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.department-form-group input {
    height: 42px;
    padding: 0 13px;
}

.department-form-group textarea {
    min-height: 90px;
    padding: 11px 13px;
    resize: vertical;
    line-height: 1.5;
}

.department-form-group input::placeholder,
.department-form-group textarea::placeholder {
    color: #a0a0a0;
}

.department-form-group input:focus,
.department-form-group textarea:focus,
.department-form-group select:focus {
    border-color: #bf2532;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.08);
}


/* Select */

.department-select-wrap {
    position: relative;
}

.department-select-wrap select {
    height: 42px;
    padding: 0 38px 0 40px;
    appearance: none;
    cursor: pointer;
}

.department-select-wrap .select-leading-icon {
    position: absolute;
    z-index: 2;
    left: 13px;
    top: 50%;
    width: 16px;
    height: 16px;
    color: #737373;
    pointer-events: none;
    transform: translateY(-50%);
}

.department-select-wrap .select-chevron {
    position: absolute;
    z-index: 2;
    right: 13px;
    top: 50%;
    width: 15px;
    height: 15px;
    color: #737373;
    pointer-events: none;
    transform: translateY(-50%);
}


/* Footer */

.department-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 17px 24px;
    background: #fafafa;
    border-top: 1px solid #eeeeee;
    border-radius: 0 0 16px 16px;
}

.department-modal-cancel,
.department-modal-submit {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 17px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.department-modal-cancel {
    color: #444444;
    background: #ffffff;
    border: 1px solid #dddddd;
}

.department-modal-cancel:hover {
    background: #f5f5f5;
}

.department-modal-submit {
    color: #ffffff;
    background: #bf2532;
    border: 1px solid #bf2532;
    box-shadow: 0 5px 14px rgba(191, 37, 50, 0.18);
}

.department-modal-submit:hover {
    background: #a91f2b;
    border-color: #a91f2b;
}

.department-modal-submit svg {
    width: 15px;
    height: 15px;
}


/* Mobile */

@media (max-width: 640px) {

    .department-modal {
        padding: 14px;
    }

    .department-modal-dialog {
        max-height: calc(100vh - 28px);
    }

    .department-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .department-modal-header,
    .department-modal-body {
        padding: 18px;
    }

    .department-modal-footer {
        padding: 14px 18px;
    }
}

/* =========================================================
   EMPLOYEES
========================================================= */

.employees-panel {
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(17, 24, 39, 0.04);
}


/* Header */

.employees-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.employees-panel-header h2 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 700;
    color: #252525;
}

.employees-panel-header p {
    margin: 0;
    font-size: 10px;
    color: #737373;
}


/* Filters */

.employee-filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.employee-search {
    position: relative;
    width: 220px;
}

.employee-search svg {
    position: absolute;
    top: 50%;
    left: 11px;
    width: 15px;
    height: 15px;
    color: #737373;
    transform: translateY(-50%);
    pointer-events: none;
}

.employee-search input {
    width: 100%;
    height: 36px;
    box-sizing: border-box;
    padding: 0 12px 0 34px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 11px;
    color: #252525;
    background: #ffffff;
}

.employee-search input::placeholder {
    color: #a0a0a0;
}

.employee-search input:focus {
    border-color: #bf2532;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.07);
}

.employee-filters select {
    height: 36px;
    min-width: 130px;
    padding: 0 30px 0 11px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 11px;
    color: #444444;
    background: #ffffff;
    cursor: pointer;
}

.employee-filters select:focus {
    border-color: #bf2532;
}


/* Table */

.employees-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.employees-table {
    width: 100%;
    border-collapse: collapse;
}

.employees-table th {
    padding: 11px 16px;
    text-align: left;
    background: #fafafa;
    border-bottom: 1px solid #eeeeee;
    color: #737373;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.employees-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #444444;
    font-size: 11px;
    vertical-align: middle;
}

.employees-table tbody tr:last-child td {
    border-bottom: 0;
}

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

.employees-table tbody tr:hover {
    background: #fcfcfc;
}


/* Employee */

.employee-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.employee-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #e8f8fd;
    color: #1687ad;
    font-size: 10px;
    font-weight: 700;
}

.employee-avatar.purple {
    background: #efedff;
    color: #6254c7;
}

.employee-avatar.green {
    background: #e8f5ee;
    color: #198754;
}

.employee-person > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.employee-person strong {
    color: #252525;
    font-size: 11px;
    font-weight: 600;
}

.employee-person span:not(.employee-avatar) {
    color: #8a8a8a;
    font-size: 9px;
}


/* Employee ID */

.employee-id {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 6px;
    background: #f5f5f5;
    color: #555555;
    font-size: 9px;
    font-weight: 600;
}


/* Important Date */

.employee-date {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.employee-date > svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #f5a623;
}

.employee-date.anniversary > svg {
    color: #bf2532;
}

.employee-date > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.employee-date strong {
    color: #333333;
    font-size: 10px;
    font-weight: 600;
}

.employee-date span {
    color: #8a8a8a;
    font-size: 9px;
}

.employee-no-date {
    color: #aaaaaa;
}


/* Documents */

.employee-document-status {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.employee-document-status strong {
    color: #252525;
    font-size: 12px;
}

.employee-document-status span {
    color: #198754;
    font-size: 9px;
}

.employee-document-status span.danger {
    color: #bf2532;
}

.employee-document-status span.warning {
    color: #b77900;
}


/* Row Menu */

.employee-row-menu {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #737373;
    cursor: pointer;
}

.employee-row-menu:hover {
    color: #bf2532;
    background: #fbeaec;
}

.employee-row-menu svg {
    width: 16px;
    height: 16px;
}


/* Responsive */

@media (max-width: 1000px) {

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

    .employee-filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .employee-search {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 640px) {

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

    .employee-search,
    .employee-filters select {
        width: 100%;
    }

    .employees-table {
        min-width: 850px;
    }
}

/* =========================================================
   ADD EMPLOYEE MODAL
========================================================= */

.employee-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.employee-modal.show {
    display: flex;
}

.employee-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    backdrop-filter: blur(2px);
}

.employee-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 650px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.18);
}


/* Header */

.employee-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid #eeeeee;
}

.employee-modal-title {
    display: flex;
    align-items: center;
    gap: 13px;
}

.employee-modal-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #bf2532;
    background: #fbeaec;
}

.employee-modal-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.9;
}

.employee-modal-title h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #252525;
}

.employee-modal-title p {
    margin: 0;
    font-size: 12px;
    color: #737373;
}

.employee-modal-close {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #737373;
    cursor: pointer;
}

.employee-modal-close:hover {
    color: #bf2532;
    background: #fbeaec;
}

.employee-modal-close svg {
    width: 18px;
    height: 18px;
}


/* Body */

.employee-modal-body {
    padding: 22px 24px 6px;
}

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

.employee-form-group {
    margin-bottom: 17px;
}

.employee-form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #333333;
}

.employee-form-group label > span {
    color: #bf2532;
}

.employee-form-group input,
.employee-form-group select {
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    padding: 0 13px;
    font-family: inherit;
    font-size: 12px;
    color: #252525;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 9px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.employee-form-group input::placeholder {
    color: #a0a0a0;
}

.employee-form-group input:focus,
.employee-form-group select:focus {
    border-color: #bf2532;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.08);
}


/* Select */

.employee-select-wrap {
    position: relative;
}

.employee-select-wrap select {
    padding-left: 40px;
    padding-right: 38px;
    appearance: none;
    cursor: pointer;
}

.employee-select-wrap .select-leading-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 13px;
    width: 16px;
    height: 16px;
    color: #737373;
    pointer-events: none;
    transform: translateY(-50%);
}

.employee-select-wrap .select-chevron {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 13px;
    width: 15px;
    height: 15px;
    color: #737373;
    pointer-events: none;
    transform: translateY(-50%);
}


/* Footer */

.employee-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background: #fafafa;
    border-top: 1px solid #eeeeee;
    border-radius: 0 0 16px 16px;
}

.employee-modal-cancel,
.employee-modal-submit {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 17px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.employee-modal-cancel {
    color: #444444;
    background: #ffffff;
    border: 1px solid #dddddd;
}

.employee-modal-cancel:hover {
    background: #f5f5f5;
}

.employee-modal-submit {
    color: #ffffff;
    background: #bf2532;
    border: 1px solid #bf2532;
    box-shadow: 0 5px 14px rgba(191, 37, 50, 0.18);
}

.employee-modal-submit:hover {
    background: #a91f2b;
    border-color: #a91f2b;
}

.employee-modal-submit svg {
    width: 15px;
    height: 15px;
}


/* Mobile */

@media (max-width: 640px) {

    .employee-modal {
        padding: 14px;
    }

    .employee-modal-dialog {
        max-height: calc(100vh - 28px);
    }

    .employee-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .employee-modal-header {
        padding: 18px;
    }

    .employee-modal-body {
        padding: 18px 18px 4px;
    }

    .employee-modal-footer {
        padding: 14px 18px;
    }
}

/* =========================================================
   REMINDERS PAGE
========================================================= */

.reminder-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
    margin-bottom: 20px;
}


/* Main Panel */

.reminders-panel {
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    overflow: hidden;
}

.reminders-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 14px;
}

.reminders-panel-header h2 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #252525;
}

.reminders-panel-header p {
    margin: 0;
    font-size: 12px;
    color: #737373;
}

.reminder-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    background: #ffffff;
    color: #252525;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.reminder-export-btn:hover {
    border-color: #BF2532;
    color: #BF2532;
}

.reminder-export-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}


/* Reminder Type Tabs */

.reminder-type-tabs {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 22px 16px;
    border-bottom: 1px solid #eeeeee;
    overflow-x: auto;
}

.reminder-type-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #e4e4e4;
    border-radius: 7px;
    background: #ffffff;
    color: #666666;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s ease;
}

.reminder-type-tabs button svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.9;
}

.reminder-type-tabs button:hover {
    border-color: #d7a6aa;
    color: #bf2532;
    background: #fffafa;
}

.reminder-type-tabs button.active {
    color: #bf2532;
    background: #fbeaec;
    border-color: #f3cdd1;
    font-weight: 600;
}


/* Filters */

.reminder-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: #fbfbfc;
    border-bottom: 1px solid #eeeeee;
}

.reminder-search {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.reminder-search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 15px;
    height: 15px;
    color: #929292;
    transform: translateY(-50%);
    pointer-events: none;
}

.reminder-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    border: 1px solid #e1e1e1;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #252525;
    font-family: inherit;
    font-size: 11px;
    transition: 0.2s ease;
}

.reminder-search input::placeholder {
    color: #a1a1a1;
}

.reminder-search input:focus {
    border-color: #d78990;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.07);
}


/* Filter Select */

.reminder-filter-select {
    position: relative;
    display: flex;
    align-items: center;
}

.reminder-filter-select > svg {
    position: absolute;
    left: 11px;
    width: 14px;
    height: 14px;
    color: #858585;
    pointer-events: none;
}

.reminder-filter-select select {
    height: 36px;
    min-width: 145px;
    padding: 0 30px 0 34px;
    border: 1px solid #e1e1e1;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #555555;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}

.reminder-filter-select select:focus {
    border-color: #d78990;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.07);
}


/* Table */

.reminders-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.reminders-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.reminders-table thead {
    background: #fafafa;
}

.reminders-table th {
    padding: 11px 14px;
    border-bottom: 1px solid #eeeeee;
    color: #8a8a8a;
    font-size: 10px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.reminders-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #444444;
    font-size: 11px;
    vertical-align: middle;
}

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

.reminders-table tbody tr:hover {
    background: #fcfcfc;
}

.reminders-table tbody tr:last-child td {
    border-bottom: 0;
}


/* Reminder Name */

.reminder-title-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.reminder-title-cell > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.reminder-title-cell strong {
    color: #292929;
    font-size: 11px;
    font-weight: 600;
}

.reminder-title-cell > div > span {
    color: #8a8a8a;
    font-size: 10px;
}


/* Reminder Icons */

.reminder-table-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.reminder-table-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.9;
}

.reminder-table-icon.expiration {
    color: #bf2532;
    background: #fbeaec;
}

.reminder-table-icon.due {
    color: #b77900;
    background: #fff4d6;
}

.reminder-table-icon.appointment {
    color: #6254c7;
    background: #efedff;
}

.reminder-table-icon.event {
    color: #1686a7;
    background: #e8f8fd;
}

.reminder-table-icon.birthday {
    color: #b44a83;
    background: #fcecf5;
}


/* Type Badges */

.reminder-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.reminder-type-badge.expiration {
    color: #bf2532;
    background: #fbeaec;
}

.reminder-type-badge.due {
    color: #a56c00;
    background: #fff4d6;
}

.reminder-type-badge.appointment {
    color: #6254c7;
    background: #efedff;
}

.reminder-type-badge.event {
    color: #1686a7;
    background: #e8f8fd;
}

.reminder-type-badge.birthday {
    color: #b44a83;
    background: #fcecf5;
}


/* Related Person / Company */

.reminder-related {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 115px;
}

.reminder-related strong {
    color: #343434;
    font-size: 11px;
    font-weight: 600;
}

.reminder-related span {
    color: #8b8b8b;
    font-size: 10px;
}


/* Reminder Date */

.reminder-date-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 115px;
}

.reminder-date-cell strong {
    color: #343434;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.reminder-date-cell span {
    color: #888888;
    font-size: 10px;
    white-space: nowrap;
}

.reminder-date-cell span.danger {
    color: #bf2532;
}


/* Notification Channel */

.reminder-channel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #606060;
    font-size: 10px;
    white-space: nowrap;
}

.reminder-channel svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.8;
}


/* Status */

.reminder-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.reminder-status.upcoming {
    color: #a56c00;
    background: #fff4d6;
}

.reminder-status.scheduled {
    color: #6254c7;
    background: #efedff;
}

.reminder-status.sent {
    color: #198754;
    background: #e8f5ee;
}

.reminder-status.overdue {
    color: #bf2532;
    background: #fbeaec;
}

.reminder-status.completed {
    color: #198754;
    background: #e8f5ee;
}


/* Row Action */

.reminder-row-menu {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #7c7c7c;
    cursor: pointer;
    transition: 0.2s ease;
}

.reminder-row-menu:hover {
    color: #bf2532;
    background: #fbeaec;
}

.reminder-row-menu svg {
    width: 16px;
    height: 16px;
}


/* Responsive */

@media (max-width: 1100px) {

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

    .reminder-filters {
        flex-wrap: wrap;
    }

    .reminder-search {
        max-width: none;
        flex: 1 1 100%;
    }

}


@media (max-width: 700px) {

    .reminder-overview-grid {
        grid-template-columns: 1fr;
    }

    .reminders-panel-header {
        padding: 16px;
    }

    .reminder-type-tabs {
        padding: 0 16px 14px;
    }

    .reminder-filters {
        padding: 12px 16px;
    }

    .reminder-filter-select {
        flex: 1;
    }

    .reminder-filter-select select {
        width: 100%;
        min-width: 0;
    }

}

/* =========================================================
   NEW REMINDER TYPE MODAL
========================================================= */

.reminder-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.reminder-modal.show {
    display: flex;
}

.reminder-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.42);
    backdrop-filter: blur(2px);
}

.reminder-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14);
    overflow: hidden;
}

.reminder-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-bottom: 1px solid #eeeeee;
}

.reminder-modal-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reminder-modal-heading-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #bf2532;
    background: #fbeaec;
}

.reminder-modal-heading-icon svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.9;
}

.reminder-modal-heading h2 {
    margin: 0 0 3px;
    color: #252525;
    font-size: 16px;
    font-weight: 700;
}

.reminder-modal-heading p {
    margin: 0;
    color: #808080;
    font-size: 11px;
}

.reminder-modal-close {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #777777;
    cursor: pointer;
    transition: 0.2s ease;
}

.reminder-modal-close:hover {
    color: #bf2532;
    background: #fbeaec;
}

.reminder-modal-close svg {
    width: 17px;
    height: 17px;
}


/* Modal Body */

.reminder-modal-body {
    padding: 18px 22px 22px;
}

.reminder-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}


/* Reminder Options */

.reminder-create-option {
    width: 100%;
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e8e8e8;
    border-radius: 11px;
    background: #ffffff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.reminder-create-option:hover {
    border-color: #dddddd;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.reminder-create-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.reminder-create-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.9;
}

.reminder-create-content {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reminder-create-content strong {
    color: #292929;
    font-size: 12px;
    font-weight: 600;
}

.reminder-create-content small {
    color: #858585;
    font-size: 10px;
    line-height: 1.45;
}

.reminder-create-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a0a0a0;
}

.reminder-create-arrow svg {
    width: 15px;
    height: 15px;
}


/* Expiration */

.reminder-create-option.expiration .reminder-create-icon {
    color: #bf2532;
    background: #fbeaec;
}

.reminder-create-option.expiration:hover {
    border-color: #efc7cb;
    background: #fffafa;
}


/* Due Date */

.reminder-create-option.due .reminder-create-icon {
    color: #b77900;
    background: #fff4d6;
}

.reminder-create-option.due:hover {
    border-color: #f1dda8;
    background: #fffdf8;
}


/* Appointment */

.reminder-create-option.appointment .reminder-create-icon {
    color: #6254c7;
    background: #efedff;
}

.reminder-create-option.appointment:hover {
    border-color: #d9d4ff;
    background: #fbfaff;
}


/* Event */

.reminder-create-option.event .reminder-create-icon {
    color: #1686a7;
    background: #e8f8fd;
}

.reminder-create-option.event:hover {
    border-color: #c7eaf5;
    background: #f9fdff;
}


/* Document Upload */

.reminder-create-option.document {
    grid-column: 1 / -1;
}

.reminder-create-option.document .reminder-create-icon {
    color: #198754;
    background: #e8f5ee;
}

.reminder-create-option.document:hover {
    border-color: #c7e6d5;
    background: #fafffc;
}


/* Mobile */

@media (max-width: 650px) {

    .reminder-modal {
        padding: 12px;
    }

    .reminder-modal-header {
        padding: 16px;
    }

    .reminder-modal-body {
        padding: 14px 16px 18px;
    }

    .reminder-type-grid {
        grid-template-columns: 1fr;
    }

    .reminder-create-option.document {
        grid-column: auto;
    }

}

/* Reminder selector - final row */

.reminder-create-option.document {
    grid-column: auto;
}

.reminder-create-option.custom .reminder-create-icon {
    color: #6b7280;
    background: #f1f3f5;
}

.reminder-create-option.custom:hover {
    border-color: #d7dadd;
    background: #fafafa;
}

/* =========================================================
   CUSTOM REMINDER FORM MODAL
========================================================= */

.custom-reminder-modal {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-reminder-modal.show {
    display: flex;
}

.custom-reminder-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.42);
    backdrop-filter: blur(2px);
}

.custom-reminder-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}


/* Header */

.custom-reminder-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.custom-reminder-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.custom-reminder-back,
.custom-reminder-close {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #777777;
    cursor: pointer;
    transition: 0.2s ease;
}

.custom-reminder-back:hover,
.custom-reminder-close:hover {
    color: #bf2532;
    background: #fbeaec;
}

.custom-reminder-back svg,
.custom-reminder-close svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.9;
}

.custom-reminder-heading-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #6b7280;
    background: #f1f3f5;
}

.custom-reminder-heading-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.9;
}

.custom-reminder-heading h2 {
    margin: 0 0 3px;
    color: #252525;
    font-size: 16px;
    font-weight: 700;
}

.custom-reminder-heading p {
    margin: 0;
    color: #808080;
    font-size: 10px;
}


/* Form */

.custom-reminder-form {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.custom-reminder-body {
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px 20px;
}

.custom-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.custom-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-form-group.full-width {
    margin-bottom: 14px;
}

.custom-form-group label {
    color: #454545;
    font-size: 10px;
    font-weight: 600;
}

.custom-form-group label > span {
    color: #bf2532;
}

.custom-form-group input[type="text"],
.custom-form-group input[type="date"],
.custom-form-group input[type="time"],
.custom-form-group select,
.custom-form-group textarea {
    width: 100%;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid #dfdfdf;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #303030;
    font-family: inherit;
    font-size: 11px;
    transition: 0.2s ease;
}

.custom-form-group textarea {
    min-height: 82px;
    padding-top: 10px;
    padding-bottom: 10px;
    resize: vertical;
}

.custom-form-group input:focus,
.custom-form-group select:focus,
.custom-form-group textarea:focus {
    border-color: #d78990;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.07);
}

.custom-form-group input::placeholder,
.custom-form-group textarea::placeholder {
    color: #a0a0a0;
}

.custom-form-group > small {
    color: #8b8b8b;
    font-size: 9px;
    line-height: 1.4;
}


/* Notification Channels */

.custom-notification-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.custom-notification-option {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    background: #ffffff;
    color: #555555;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}

.custom-notification-option:hover {
    border-color: #d8b0b4;
    background: #fffafa;
}

.custom-notification-option input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #bf2532;
}

.custom-channel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777777;
}

.custom-channel-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.8;
}


/* Footer */

.custom-reminder-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
}

.custom-reminder-cancel,
.custom-reminder-submit {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 7px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.custom-reminder-cancel {
    border: 1px solid #dfdfdf;
    background: #ffffff;
    color: #606060;
}

.custom-reminder-cancel:hover {
    background: #f7f7f7;
}

.custom-reminder-submit {
    border: 1px solid #bf2532;
    background: #bf2532;
    color: #ffffff;
}

.custom-reminder-submit:hover {
    background: #a91f2b;
    border-color: #a91f2b;
}

.custom-reminder-submit svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}


/* Mobile */

@media (max-width: 650px) {

    .custom-reminder-modal {
        padding: 10px;
    }

    .custom-reminder-dialog {
        max-height: calc(100vh - 20px);
    }

    .custom-reminder-header {
        padding: 14px;
    }

    .custom-reminder-body {
        padding: 14px;
    }

    .custom-form-row {
        grid-template-columns: 1fr;
    }

    .custom-notification-options {
        grid-template-columns: 1fr;
    }

    .custom-reminder-footer {
        padding: 12px 14px;
    }

}

/* =========================================================
   SIDEBAR LOGO + QUICK LINKS FIX
========================================================= */

/* Logo */
.sidebar-logo {
    height: 64px;
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid #eeeeee;
}

.sidebar-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-logo img {
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}


/* Quick Links Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 10px 13px 12px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
}

.quick-links-title {
    display: block;
    margin-bottom: 7px;
    color: #9a9a9a;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.quick-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-links button {
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e1e1e1;
    border-radius: 7px;
    background: #ffffff;
    color: #69717d;
    cursor: pointer;
    transition: 0.2s ease;
}

.quick-links button:hover {
    color: #bf2532;
    border-color: #efc7cb;
    background: #fbeaec;
}

.quick-links button svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
}

/* =========================================================
   CALENDAR PAGE
========================================================= */

.calendar-workspace {
    margin-top: 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}


/* Toolbar */
.calendar-toolbar {
    min-height: 76px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.calendar-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-today-btn {
    height: 34px;
    padding: 0 14px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.calendar-today-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.calendar-navigation {
    display: flex;
    gap: 5px;
}

.calendar-navigation button {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #606773;
    cursor: pointer;
}

.calendar-navigation button:hover {
    color: var(--primary);
    border-color: #efc7cb;
    background: var(--primary-soft);
}

.calendar-navigation svg {
    width: 15px;
    height: 15px;
}

.calendar-current-month {
    margin-left: 4px;
}

.calendar-current-month h2 {
    margin: 0 0 3px;
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
}

.calendar-current-month span {
    color: var(--text-muted);
    font-size: 10px;
}


/* View Switcher */
.calendar-view-switcher {
    padding: 3px;
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f7f7f8;
}

.calendar-view-switcher button {
    height: 29px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #727782;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.calendar-view-switcher button.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}


/* Main Layout */
.calendar-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 650px;
}


/* Left Sidebar */
.calendar-sidebar {
    padding: 18px 15px;
    border-right: 1px solid var(--border);
    background: #fcfcfd;
}

.calendar-side-section + .calendar-side-section {
    margin-top: 28px;
}

.calendar-side-heading {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-side-heading h3 {
    margin: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.calendar-side-heading svg {
    width: 14px;
    height: 14px;
    color: #9499a1;
}


/* Filters */
.calendar-filter-option {
    min-height: 34px;
    display: grid;
    grid-template-columns: 14px 8px 1fr auto;
    align-items: center;
    gap: 8px;
    color: #555c66;
    font-size: 10px;
    cursor: pointer;
}

.calendar-filter-option input {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: var(--primary);
}

.calendar-filter-option strong {
    min-width: 22px;
    padding: 3px 6px;
    border-radius: 10px;
    background: #f0f1f3;
    color: #777d86;
    font-size: 9px;
    font-weight: 600;
    text-align: center;
}

.calendar-filter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.calendar-filter-dot.expiration {
    background: #dc3545;
}

.calendar-filter-dot.due {
    background: #f5a623;
}

.calendar-filter-dot.appointment {
    background: #6254c7;
}

.calendar-filter-dot.event {
    background: #35bdeb;
}

.calendar-filter-dot.birthday {
    background: #198754;
}


/* Upcoming */
.calendar-upcoming-item {
    padding: 9px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eeeeef;
}

.calendar-upcoming-item:last-child {
    border-bottom: 0;
}

.calendar-upcoming-date {
    width: 38px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
}

.calendar-upcoming-date.warning {
    background: var(--accent-soft);
    color: #b77900;
}

.calendar-upcoming-date.purple {
    background: #efedff;
    color: #6254c7;
}

.calendar-upcoming-date strong {
    font-size: 13px;
    line-height: 1;
}

.calendar-upcoming-date small {
    margin-top: 3px;
    font-size: 7px;
    font-weight: 700;
}

.calendar-upcoming-item > div:last-child {
    min-width: 0;
}

.calendar-upcoming-item > div:last-child strong {
    display: block;
    overflow: hidden;
    color: #3e4248;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calendar-upcoming-item > div:last-child span {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: #9499a1;
    font-size: 8px;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* Main Calendar */
.calendar-main {
    min-width: 0;
    background: #ffffff;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-bottom: 1px solid var(--border);
}

.calendar-weekdays span {
    padding: 11px 10px;
    color: #8b9098;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: minmax(112px, 1fr);
}

.calendar-day {
    position: relative;
    min-width: 0;
    padding: 9px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day.outside {
    background: #fafafa;
}

.calendar-day.outside .calendar-day-number {
    color: #c1c4c9;
}

.calendar-day-number {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #555b65;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
}


/* Today */
.calendar-day.today {
    background: #fffafb;
}

.calendar-day.today .calendar-day-number {
    background: var(--primary);
    color: #ffffff;
}

.calendar-today-label {
    position: absolute;
    top: 12px;
    right: 9px;
    padding: 3px 6px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 7px;
    font-weight: 700;
}


/* Calendar Events */
.calendar-event {
    width: 100%;
    min-width: 0;
    margin-top: 5px;
    padding: 5px 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 0;
    border-radius: 5px;
    font-family: inherit;
    font-size: 8px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.calendar-event svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.calendar-event span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calendar-event.expiration {
    background: #fbeaec;
    color: #bf2532;
}

.calendar-event.due {
    background: #fff4d6;
    color: #a66b00;
}

.calendar-event.appointment {
    background: #efedff;
    color: #6254c7;
}

.calendar-event.event {
    background: #e8f8fd;
    color: #1685aa;
}

.calendar-event.birthday {
    background: #e8f5ee;
    color: #198754;
}


/* Responsive */
@media (max-width: 1100px) {
    .calendar-layout {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .calendar-grid {
        grid-auto-rows: minmax(100px, 1fr);
    }
}

@media (max-width: 850px) {
    .calendar-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .calendar-layout {
        display: block;
    }

    .calendar-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .calendar-grid {
        min-width: 700px;
    }

    .calendar-main {
        overflow-x: auto;
    }
}

/* =========================================================
   DASHBOARD CALENDAR
   ========================================================= */

.dashboard-calendar-panel {
    overflow: hidden;
}

.dashboard-calendar-header {
    margin-bottom: 0;
    padding-bottom: 13px;
    border-bottom: 1px solid #eeeeee;
}

.dashboard-calendar-header a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dashboard-calendar-header a svg {
    width: 13px;
    height: 13px;
}


/* Toolbar */
.dashboard-calendar-toolbar {
    min-height: 48px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eeeeee;
    background: #ffffff;
}

.dashboard-calendar-navigation {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dashboard-calendar-navigation strong {
    min-width: 105px;
    color: #30343a;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.dashboard-calendar-navigation button {
    width: 27px;
    height: 27px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #737983;
    cursor: pointer;
}

.dashboard-calendar-navigation button:hover {
    border-color: #efc7cb;
    background: #fbeaec;
    color: #bf2532;
}

.dashboard-calendar-navigation button svg {
    width: 13px;
    height: 13px;
}


/* Legend */
.dashboard-calendar-legend {
    display: flex;
    align-items: center;
    gap: 11px;
}

.dashboard-calendar-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #7d838c;
    font-size: 8px;
    font-weight: 500;
}

.dashboard-calendar-dot {
    width: 6px;
    height: 6px;
    display: block;
    border-radius: 50%;
}

.dashboard-calendar-dot.expiration {
    background: #bf2532;
}

.dashboard-calendar-dot.reminder {
    background: #f5a623;
}

.dashboard-calendar-dot.event {
    background: #6254c7;
}


/* Calendar Grid */
.dashboard-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #e9eaed;
    gap: 1px;
}


/* Weekday Header */
.dashboard-calendar-weekday {
    height: 28px;
    display: flex;
    align-items: center;
    padding: 0 7px;
    background: #fafafb;
    color: #90959d;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.35px;
}


/* Day Cell */
.dashboard-calendar-day {
    position: relative;
    min-width: 0;
    height: 66px;
    padding: 6px;
    background: #ffffff;
    overflow: hidden;
    transition: background 0.15s ease;
}

.dashboard-calendar-day:hover {
    background: #fcfcfd;
}

.dashboard-calendar-day.muted {
    background: #fafafa;
}

.dashboard-calendar-date {
    width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #555b63;
    font-size: 8px;
    font-weight: 600;
}

.dashboard-calendar-day.muted .dashboard-calendar-date {
    color: #b7bbc1;
}


/* Today */
.dashboard-calendar-day.today {
    background: #fffafb;
}

.dashboard-calendar-day.today::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: #bf2532;
}

.dashboard-calendar-day.today .dashboard-calendar-date {
    background: #bf2532;
    color: #ffffff;
}

.dashboard-calendar-today {
    position: absolute;
    top: 8px;
    right: 6px;
    color: #bf2532;
    font-size: 6px;
    font-weight: 700;
    text-transform: uppercase;
}


/* Calendar Events */
.dashboard-calendar-event {
    width: 100%;
    min-width: 0;
    margin-top: 4px;
    padding: 4px 5px;
    display: flex;
    align-items: center;
    gap: 3px;
    border-radius: 4px;
    font-size: 7px;
    font-weight: 600;
    line-height: 1.15;
    overflow: hidden;
}

.dashboard-calendar-event svg {
    width: 9px;
    height: 9px;
    min-width: 9px;
    stroke-width: 2;
}

.dashboard-calendar-event > span {
    min-width: 0;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* Expiration */
.dashboard-calendar-event.expiration {
    border-left: 2px solid #bf2532;
    background: #fbeaec;
    color: #a61f2b;
}


/* Reminder / Due Date */
.dashboard-calendar-event.reminder {
    border-left: 2px solid #f5a623;
    background: #fff4d6;
    color: #9b6800;
}


/* Appointment */
.dashboard-calendar-event.appointment {
    border-left: 2px solid #35bdeb;
    background: #e8f8fd;
    color: #187a9d;
}


/* Event */
.dashboard-calendar-event.event {
    border-left: 2px solid #6254c7;
    background: #efedff;
    color: #5548b2;
}


/* Birthday */
.dashboard-calendar-event.birthday {
    border-left: 2px solid #d55a91;
    background: #fcecf3;
    color: #a83c6d;
}


/* Responsive */
@media (max-width: 1280px) {

    .dashboard-calendar-day {
        height: 62px;
        padding: 5px;
    }

    .dashboard-calendar-event {
        padding: 3px 4px;
        font-size: 6.5px;
    }

    .dashboard-calendar-event svg {
        display: none;
    }
}

@media (max-width: 768px) {

    .dashboard-calendar-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-calendar-legend {
        flex-wrap: wrap;
    }

    .dashboard-calendar-day {
        height: 58px;
        padding: 4px;
    }

    .dashboard-calendar-weekday {
        padding: 0 4px;
        font-size: 6px;
    }

    .dashboard-calendar-event {
        padding: 3px;
        font-size: 6px;
    }
}

/* =========================================================
   DASHBOARD MINI CALENDAR
========================================================= */

.dashboard-calendar-panel {
    overflow: hidden;
}

.dashboard-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 0 12px;
    padding: 11px 12px;
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 10px;
}


/* Month Navigation */
.dashboard-calendar-month {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-calendar-month button {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e5e5e5;
    border-radius: 7px;
    background: #ffffff;
    color: #626262;
    cursor: pointer;
    transition: 0.2s ease;
}

.dashboard-calendar-month button:hover {
    color: #bf2532;
    border-color: #efc7cb;
    background: #fbeaec;
}

.dashboard-calendar-month button svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.dashboard-calendar-month > div {
    min-width: 108px;
}

.dashboard-calendar-month strong {
    display: block;
    color: #252525;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.dashboard-calendar-month > div > span {
    display: block;
    margin-top: 2px;
    color: #929292;
    font-size: 8px;
    font-weight: 500;
}


/* Legend */
.dashboard-calendar-legend {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-calendar-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #777777;
    font-size: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-calendar-dot {
    width: 6px;
    height: 6px;
    display: inline-block;
    flex-shrink: 0;
    border-radius: 50%;
}

.dashboard-calendar-dot.expiration {
    background: #bf2532;
}

.dashboard-calendar-dot.reminder {
    background: #f5a623;
}

.dashboard-calendar-dot.event {
    background: #6254c7;
}


/* Calendar Grid */
.dashboard-mini-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #ececec;
    border-left: 1px solid #ececec;
    border-radius: 9px;
    overflow: hidden;
}


/* Weekday Header */
.dashboard-calendar-weekday {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-right: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    color: #8b8b8b;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25px;
}


/* Individual Day */
.dashboard-calendar-day {
    position: relative;
    min-width: 0;
    height: 57px;
    padding: 6px;
    background: #ffffff;
    border-right: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    transition: background 0.18s ease;
}

.dashboard-calendar-day:hover {
    background: #fcfcfc;
}

.dashboard-calendar-date {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #555555;
    font-size: 9px;
    font-weight: 600;
    border-radius: 50%;
}


/* Previous Month */
.dashboard-calendar-day.outside {
    background: #fbfbfb;
}

.dashboard-calendar-day.outside .dashboard-calendar-date {
    color: #c4c4c4;
}


/* Today */
.dashboard-calendar-day.today {
    background: #fff9f9;
    box-shadow: inset 0 0 0 1px #f5d9dc;
}

.dashboard-calendar-day.today .dashboard-calendar-date {
    background: #bf2532;
    color: #ffffff;
    font-weight: 700;
}

.dashboard-calendar-today-label {
    position: absolute;
    top: 8px;
    right: 6px;
    color: #bf2532;
    font-size: 7px;
    font-weight: 700;
}


/* Event Chips */
.dashboard-calendar-event {
    position: absolute;
    right: 4px;
    bottom: 5px;
    left: 4px;
    min-width: 0;
    display: block;
    padding: 3px 5px;
    border-radius: 4px;
    overflow: hidden;
    font-size: 7px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dashboard-calendar-event.expiration {
    color: #a91f2b;
    background: #fbeaec;
    border-left: 2px solid #bf2532;
}

.dashboard-calendar-event.reminder {
    color: #a66b00;
    background: #fff4d6;
    border-left: 2px solid #f5a623;
}

.dashboard-calendar-event.event {
    color: #5647b7;
    background: #efedff;
    border-left: 2px solid #6254c7;
}

.dashboard-calendar-event.birthday {
    color: #17744b;
    background: #e8f5ee;
    border-left: 2px solid #198754;
}

.dashboard-calendar-event.appointment {
    color: #16789a;
    background: #e8f8fd;
    border-left: 2px solid #35bdeb;
}


/* Responsive */
@media (max-width: 1100px) {

    .dashboard-calendar-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-calendar-legend {
        flex-wrap: wrap;
    }

}

@media (max-width: 700px) {

    .dashboard-calendar-day {
        height: 52px;
        padding: 4px;
    }

    .dashboard-calendar-event {
        right: 3px;
        bottom: 4px;
        left: 3px;
        padding: 3px;
        font-size: 6px;
    }

    .dashboard-calendar-today-label {
        display: none;
    }

}

/* =========================================================
   PANEL HEADER ACTION ALIGNMENT
========================================================= */

.dashboard-content-grid .panel-header > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto;
    white-space: nowrap;
}

.dashboard-content-grid .panel-header > a svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke-width: 2;
}

/* =========================================================
   PAGE PRIMARY BUTTON
========================================================= */

.page-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: 0;
    border-radius: 7px;
    background: #BF2532;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.page-primary-btn:hover {
    background: #a91f2b;
}

.page-primary-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

/* Documents page spacing */
.documents-page .page-header {
    margin-bottom: 18px;
}

/* =========================================================
   DOCUMENTS SUMMARY CARDS
========================================================= */

.documents-page .summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.documents-page .summary-card {
    width: 100%;
    min-width: 0;
}

@media (max-width: 1000px) {
    .documents-page .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .documents-page .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   DOCUMENTS LIST
========================================================= */

.documents-list-panel {
    margin-top: 14px;
    overflow: hidden;
}

.documents-list-panel .panel-header {
    padding-bottom: 14px;
    border-bottom: 1px solid #eeeeee;
}

.documents-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666666;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}


/* Toolbar */

.documents-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 12px 12px;
}


.documents-table-wrap {
    margin: 0 12px 12px;
    width: calc(100% - 24px);
}


.documents-search {
    position: relative;
    width: 260px;
}

.documents-search svg {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 14px;
    height: 14px;
    color: #8a8a8a;
    transform: translateY(-50%);
    pointer-events: none;
}

.documents-search input {
    width: 100%;
    height: 34px;
    padding: 0 12px 0 32px;
    border: 1px solid #e2e2e2;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 10px;
    transition: 0.2s ease;
}

.documents-search input:focus {
    border-color: #dca3a8;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.06);
}

.documents-toolbar select {
    height: 34px;
    min-width: 125px;
    padding: 0 30px 0 10px;
    border: 1px solid #e2e2e2;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #555555;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
}


/* Table */

.documents-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #eeeeee;
    border-radius: 9px;
}

.documents-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.documents-table thead {
    background: #fafafa;
}

.documents-table th {
    padding: 10px 12px;
    border-bottom: 1px solid #eeeeee;
    color: #888888;
    font-size: 8px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.25px;
    white-space: nowrap;
}

.documents-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #4f4f4f;
    font-size: 10px;
    vertical-align: middle;
}

.documents-table tbody tr:last-child td {
    border-bottom: 0;
}

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

.documents-table tbody tr:hover {
    background: #fcfcfc;
}


/* Document column */

.document-name-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 220px;
}

.document-file-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #fbeaec;
    color: #bf2532;
}

.document-file-icon.company {
    background: #fff4d6;
    color: #b77900;
}

.document-file-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 1.8;
}

.document-name-cell > div,
.document-owner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.document-name-cell strong,
.document-owner strong {
    color: #303030;
    font-size: 10px;
    font-weight: 600;
}

.document-name-cell span:not(.document-file-icon),
.document-owner span {
    color: #9a9a9a;
    font-size: 8px;
}


/* Status */

.document-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.document-status.valid {
    color: #17744b;
    background: #e8f5ee;
}

.document-status.expiring {
    color: #a66b00;
    background: #fff4d6;
}

.document-status.expired {
    color: #bf2532;
    background: #fbeaec;
}


/* Row action */

.document-action-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #ffffff;
    color: #777777;
    cursor: pointer;
}

.document-action-btn:hover {
    color: #bf2532;
    border-color: #efc7cb;
    background: #fbeaec;
}

.document-action-btn svg {
    width: 14px;
    height: 14px;
}


/* Responsive */

@media (max-width: 800px) {
    .documents-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .documents-search {
        width: 100%;
    }

    .documents-toolbar select {
        width: 100%;
    }
}

/* =========================================================
   UPLOAD DOCUMENT MODAL
========================================================= */

#uploadDocumentModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 24, 32, 0.45);
    backdrop-filter: blur(2px);
}

#uploadDocumentModal.active {
    display: flex;
}

#uploadDocumentModal .modal-card {
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(20, 24, 32, 0.18);
}


/* Header */

#uploadDocumentModal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

#uploadDocumentModal .modal-header h2 {
    margin: 0;
    color: #252525;
    font-size: 16px;
    font-weight: 700;
}

#uploadDocumentModal .modal-header p {
    margin: 4px 0 0;
    color: #8a8a8a;
    font-size: 9px;
}

#uploadDocumentModal .modal-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e6e6e6;
    border-radius: 7px;
    background: #ffffff;
    color: #777777;
    cursor: pointer;
}

#uploadDocumentModal .modal-close:hover {
    color: #bf2532;
    border-color: #efc7cb;
    background: #fbeaec;
}

#uploadDocumentModal .modal-close svg {
    width: 15px;
    height: 15px;
}


/* Body */

#uploadDocumentModal .modal-body {
    padding: 18px 20px;
}

#uploadDocumentModal .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

#uploadDocumentModal .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 13px;
}

#uploadDocumentModal .form-grid .form-group {
    margin-bottom: 0;
}

#uploadDocumentModal .form-group label {
    color: #454545;
    font-size: 9px;
    font-weight: 600;
}

#uploadDocumentModal .form-group input,
#uploadDocumentModal .form-group select,
#uploadDocumentModal .form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e2e2e2;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 10px;
    transition: 0.2s ease;
}

#uploadDocumentModal .form-group input,
#uploadDocumentModal .form-group select {
    height: 36px;
    padding: 0 10px;
}

#uploadDocumentModal .form-group textarea {
    min-height: 70px;
    padding: 10px;
    resize: vertical;
}

#uploadDocumentModal .form-group input:focus,
#uploadDocumentModal .form-group select:focus,
#uploadDocumentModal .form-group textarea:focus {
    border-color: #dca3a8;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.06);
}


/* Upload Area */

#uploadDocumentModal .document-upload-area {
    position: relative;
    min-height: 105px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 16px;
    border: 1px dashed #d9b2b6;
    border-radius: 9px;
    background: #fffafa;
    text-align: center;
    overflow: hidden;
}

#uploadDocumentModal .document-upload-area > svg {
    width: 23px;
    height: 23px;
    color: #bf2532;
}

#uploadDocumentModal .document-upload-area strong {
    color: #404040;
    font-size: 10px;
    font-weight: 600;
}

#uploadDocumentModal .document-upload-area span {
    color: #999999;
    font-size: 8px;
}

#uploadDocumentModal .document-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}


/* Footer */

#uploadDocumentModal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
    background: #fafafa;
}

#uploadDocumentModal .modal-cancel-btn {
    height: 34px;
    padding: 0 13px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #555555;
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

#uploadDocumentModal .modal-cancel-btn:hover {
    background: #f5f5f5;
}


/* Responsive */

@media (max-width: 650px) {
    #uploadDocumentModal {
        padding: 12px;
    }

    #uploadDocumentModal .form-grid {
        grid-template-columns: 1fr;
    }

    #uploadDocumentModal .modal-card {
        max-height: calc(100vh - 24px);
    }
}

/* =========================================================
   UPLOAD DOCUMENT MODAL - VISIBILITY FIX
========================================================= */

#uploadDocumentModal {
    position: fixed;
    inset: 0;
    z-index: 99999;

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

    padding: 24px;

    background: rgba(20, 24, 32, 0.48);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#uploadDocumentModal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#uploadDocumentModal .modal-card {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);

    overflow-y: auto;

    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;

    opacity: 1;
    visibility: visible;

    transform: none;

    box-shadow: 0 20px 60px rgba(20, 24, 32, 0.20);
}

/* =========================================================
   TASKS PAGE LAYOUT FINAL FIX
========================================================= */

.tasks-page {
    width: 100%;
    max-width: none;
}

/* Header */
.tasks-page > .page-header {
    width: 100%;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px;
    margin-bottom: 20px !important;
}

.tasks-page > .page-header > div {
    flex: 1;
}

.tasks-page > .page-header h1 {
    margin: 0 0 5px !important;
}

.tasks-page > .page-header p {
    margin: 0 !important;
}

.tasks-page > .page-header .page-primary-btn {
    flex-shrink: 0;
    margin: 0 0 0 auto !important;
}


/* Task Cards */
.tasks-page > .summary-grid {
    width: 100% !important;
    max-width: none !important;

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

    gap: 12px !important;

    margin: 0 0 14px !important;
}

.tasks-page > .summary-grid .summary-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}


/* All Tasks */
.tasks-page .tasks-list-panel {
    width: 100%;
    margin-top: 0 !important;
}


/* Responsive */
@media (max-width: 1000px) {

    .tasks-page > .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

}

@media (max-width: 600px) {

    .tasks-page > .page-header {
        flex-direction: column;
    }

    .tasks-page > .page-header .page-primary-btn {
        margin-left: 0 !important;
    }

    .tasks-page > .summary-grid {
        grid-template-columns: 1fr !important;
    }

}

/* =========================================================
   NEW TASK MODAL
========================================================= */

#newTaskModal {
    position: fixed;
    inset: 0;
    z-index: 99999;

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

    padding: 24px;

    background: rgba(20, 24, 32, 0.48);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#newTaskModal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}


/* Modal Card */
#newTaskModal .modal-card {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);

    overflow-y: auto;

    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;

    box-shadow: 0 20px 60px rgba(20, 24, 32, 0.20);
}


/* Header */
#newTaskModal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 18px 20px;

    border-bottom: 1px solid #eeeeee;
}

#newTaskModal .modal-header h2 {
    margin: 0;

    color: #252525;

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

#newTaskModal .modal-header p {
    margin: 4px 0 0;

    color: #8a8a8a;

    font-size: 9px;
}


/* Close Button */
#newTaskModal .modal-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;

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

    padding: 0;

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

    background: #ffffff;
    color: #777777;

    cursor: pointer;
}

#newTaskModal .modal-close:hover {
    color: #bf2532;
    border-color: #efc7cb;
    background: #fbeaec;
}

#newTaskModal .modal-close svg {
    width: 15px;
    height: 15px;
}


/* Body */
#newTaskModal .modal-body {
    padding: 18px 20px;
}


/* Form */
#newTaskModal .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

#newTaskModal .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-bottom: 13px;
}

#newTaskModal .form-grid .form-group {
    margin-bottom: 0;
}

#newTaskModal .form-group label {
    color: #454545;

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

#newTaskModal .form-group input,
#newTaskModal .form-group select,
#newTaskModal .form-group textarea {
    width: 100%;
    box-sizing: border-box;

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

    outline: none;

    background: #ffffff;
    color: #333333;

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

    transition: 0.2s ease;
}

#newTaskModal .form-group input,
#newTaskModal .form-group select {
    height: 36px;
    padding: 0 10px;
}

#newTaskModal .form-group textarea {
    min-height: 75px;

    padding: 10px;

    resize: vertical;
}

#newTaskModal .form-group input:focus,
#newTaskModal .form-group select:focus,
#newTaskModal .form-group textarea:focus {
    border-color: #dca3a8;

    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.06);
}


/* Footer */
#newTaskModal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    padding: 14px 20px;

    border-top: 1px solid #eeeeee;

    background: #fafafa;
}

#newTaskModal .modal-cancel-btn {
    height: 34px;

    padding: 0 13px;

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

    background: #ffffff;
    color: #555555;

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

    cursor: pointer;
}

#newTaskModal .modal-cancel-btn:hover {
    background: #f5f5f5;
}


/* Responsive */
@media (max-width: 650px) {

    #newTaskModal {
        padding: 12px;
    }

    #newTaskModal .modal-card {
        max-height: calc(100vh - 24px);
    }

    #newTaskModal .form-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   ASSETS PAGE
========================================================= */

.assets-page {
    width: 100%;
    max-width: none;
}

/* Header */
.assets-page > .page-header {
    width: 100%;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px;
    margin-bottom: 20px !important;
}

.assets-page > .page-header > div {
    flex: 1;
}

.assets-page > .page-header h1 {
    margin: 0 0 5px !important;
}

.assets-page > .page-header p {
    margin: 0 !important;
}

.assets-page > .page-header .page-primary-btn {
    flex-shrink: 0;
    margin: 0 0 0 auto !important;
}


/* Asset Cards */
.assets-page > .summary-grid {
    width: 100% !important;
    max-width: none !important;

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

    gap: 12px !important;
    margin: 0 0 14px !important;
}

.assets-page > .summary-grid .summary-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}


/* Asset List */
.assets-page .assets-list-panel {
    width: 100%;
    margin-top: 0 !important;
}


/* Responsive */
@media (max-width: 1000px) {
    .assets-page > .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .assets-page > .page-header {
        flex-direction: column;
    }

    .assets-page > .page-header .page-primary-btn {
        margin-left: 0 !important;
    }

    .assets-page > .summary-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Assets submenu icons */
.nav-submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-submenu a svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke-width: 1.8;
}

/* =========================================================
   VEHICLES PAGE
========================================================= */

.vehicles-page {
    width: 100%;
    max-width: none;
}


/* Page Header */
.vehicles-page > .page-header {
    width: 100%;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px;
    margin-bottom: 20px !important;
}

.vehicles-page > .page-header > div {
    flex: 1;
}

.vehicles-page > .page-header h1 {
    margin: 0 0 5px !important;
}

.vehicles-page > .page-header p {
    margin: 0 !important;
}

.vehicles-page > .page-header .page-primary-btn {
    flex-shrink: 0;
    margin: 0 0 0 auto !important;
}


/* Summary Cards */
.vehicles-page > .summary-grid {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 0 14px !important;
}

.vehicles-page > .summary-grid .summary-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}


/* Main Vehicle Panel */
.vehicles-list-panel {
    width: 100%;
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    overflow: hidden;
}


/* Panel Header */
.vehicles-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    border-bottom: 1px solid #eeeeee;
}

.vehicles-panel-header h2 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 700;
    color: #252525;
}

.vehicles-panel-header p {
    margin: 0;
    font-size: 10px;
    color: #8a8a8a;
}

.vehicles-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666666;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}


/* Filters */
.vehicles-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-bottom: 1px solid #eeeeee;
}

.vehicles-search {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.vehicles-search svg {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 14px;
    height: 14px;
    color: #8a8a8a;
    transform: translateY(-50%);
    pointer-events: none;
}

.vehicles-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 34px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #252525;
    font-family: inherit;
    font-size: 11px;
    outline: none;
    box-sizing: border-box;
}

.vehicles-search input:focus {
    border-color: #BF2532;
}

.vehicles-filters select {
    height: 36px;
    min-width: 130px;
    padding: 0 32px 0 11px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #555555;
    font-family: inherit;
    font-size: 11px;
    outline: none;
}

.vehicles-filters select:focus {
    border-color: #BF2532;
}


/* Vehicle Table */
.vehicles-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.vehicles-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.vehicles-table thead {
    background: #fafafa;
}

.vehicles-table th {
    padding: 10px 12px;
    border-bottom: 1px solid #eeeeee;
    color: #777777;
    font-size: 9px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.vehicles-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eeeeee;
    color: #555555;
    font-size: 10px;
    vertical-align: middle;
}

.vehicles-table tbody tr:last-child td {
    border-bottom: 0;
}

.vehicles-table tbody tr:hover {
    background: #fcfcfc;
}


/* Vehicle Information */
.vehicle-info {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 180px;
}

.vehicle-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #FBEAEC;
    color: #BF2532;
}

.vehicle-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
}

.vehicle-info > div:last-child,
.vehicle-person {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vehicle-info strong,
.vehicle-person strong {
    color: #252525;
    font-size: 10px;
    font-weight: 600;
}

.vehicle-info span,
.vehicle-person span {
    color: #999999;
    font-size: 9px;
}


/* Compliance Status */
.vehicle-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.vehicle-status.compliant {
    background: #E8F5EE;
    color: #198754;
}

.vehicle-status.expiring {
    background: #FFF4D6;
    color: #B77900;
}

.vehicle-status.expired {
    background: #FBEAEC;
    color: #BF2532;
}


/* Reminder Count */
.vehicle-reminders {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #555555;
    font-weight: 600;
}

.vehicle-reminders svg {
    width: 13px;
    height: 13px;
}


/* More Button */
.vehicle-more-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    color: #666666;
    cursor: pointer;
}

.vehicle-more-btn:hover {
    background: #f7f7f7;
}

.vehicle-more-btn svg {
    width: 14px;
    height: 14px;
}


/* =========================================================
   ADD VEHICLE MODAL
========================================================= */

#vehicleModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 20, 20, 0.45);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.vehicle-modal-card {
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.vehicle-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.vehicle-modal-header h2 {
    margin: 0 0 4px;
    color: #252525;
    font-size: 18px;
}

.vehicle-modal-header p {
    margin: 0;
    color: #888888;
    font-size: 11px;
}

.vehicle-modal-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #777777;
    cursor: pointer;
}

.vehicle-modal-close:hover {
    background: #f5f5f5;
}

.vehicle-modal-close svg {
    width: 17px;
    height: 17px;
}

.vehicle-modal-body {
    padding: 18px 20px;
    overflow-y: auto;
}

.vehicle-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.vehicle-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.vehicle-form-group label {
    color: #444444;
    font-size: 10px;
    font-weight: 600;
}

.vehicle-form-group input,
.vehicle-form-group select,
.vehicle-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 11px;
    outline: none;
}

.vehicle-form-group input,
.vehicle-form-group select {
    height: 38px;
    padding: 0 11px;
}

.vehicle-form-group textarea {
    min-height: 85px;
    padding: 10px 11px;
    resize: vertical;
}

.vehicle-form-group input:focus,
.vehicle-form-group select:focus,
.vehicle-form-group textarea:focus {
    border-color: #BF2532;
}

.vehicle-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
}

.vehicle-cancel-btn,
.vehicle-save-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border-radius: 7px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.vehicle-cancel-btn {
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #555555;
}

.vehicle-save-btn {
    border: 1px solid #BF2532;
    background: #BF2532;
    color: #ffffff;
}

.vehicle-save-btn svg {
    width: 14px;
    height: 14px;
}


/* Responsive */
@media (max-width: 1000px) {

    .vehicles-page > .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

}

@media (max-width: 700px) {

    .vehicles-page > .page-header {
        flex-direction: column;
    }

    .vehicles-page > .page-header .page-primary-btn {
        margin-left: 0 !important;
    }

    .vehicles-page > .summary-grid {
        grid-template-columns: 1fr !important;
    }

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

    .vehicles-search,
    .vehicles-filters select {
        width: 100%;
    }

    .vehicle-form-grid {
        grid-template-columns: 1fr;
    }

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

}

/* =========================================================
   EQUIPMENT PAGE
========================================================= */

.equipment-page {
    width: 100%;
    max-width: none;
}


/* Page Header */
.equipment-page > .page-header {
    width: 100%;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px;
    margin-bottom: 20px !important;
}

.equipment-page > .page-header > div {
    flex: 1;
}

.equipment-page > .page-header h1 {
    margin: 0 0 5px !important;
}

.equipment-page > .page-header p {
    margin: 0 !important;
}

.equipment-page > .page-header .page-primary-btn {
    flex-shrink: 0;
    margin: 0 0 0 auto !important;
}


/* Summary Cards */
.equipment-page > .summary-grid {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 0 14px !important;
}

.equipment-page > .summary-grid .summary-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}


/* Main Panel */
.equipment-list-panel {
    width: 100%;
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    overflow: hidden;
}


/* Panel Header */
.equipment-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    border-bottom: 1px solid #eeeeee;
}

.equipment-panel-header h2 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 700;
    color: #252525;
}

.equipment-panel-header p {
    margin: 0;
    font-size: 10px;
    color: #8a8a8a;
}

.equipment-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666666;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}


/* Filters */
.equipment-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-bottom: 1px solid #eeeeee;
}

.equipment-search {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.equipment-search svg {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 14px;
    height: 14px;
    color: #8a8a8a;
    transform: translateY(-50%);
    pointer-events: none;
}

.equipment-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 34px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #252525;
    font-family: inherit;
    font-size: 11px;
    outline: none;
    box-sizing: border-box;
}

.equipment-search input:focus {
    border-color: #BF2532;
}

.equipment-filters select {
    height: 36px;
    min-width: 140px;
    padding: 0 32px 0 11px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #555555;
    font-family: inherit;
    font-size: 11px;
    outline: none;
}

.equipment-filters select:focus {
    border-color: #BF2532;
}


/* Table */
.equipment-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.equipment-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.equipment-table thead {
    background: #fafafa;
}

.equipment-table th {
    padding: 10px 12px;
    border-bottom: 1px solid #eeeeee;
    color: #777777;
    font-size: 9px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.equipment-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eeeeee;
    color: #555555;
    font-size: 10px;
    vertical-align: middle;
}

.equipment-table tbody tr:last-child td {
    border-bottom: 0;
}

.equipment-table tbody tr:hover {
    background: #fcfcfc;
}


/* Equipment Info */
.equipment-info {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 190px;
}

.equipment-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #FBEAEC;
    color: #BF2532;
}

.equipment-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
}

.equipment-info > div:last-child,
.equipment-person {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.equipment-info strong,
.equipment-person strong {
    color: #252525;
    font-size: 10px;
    font-weight: 600;
}

.equipment-info span,
.equipment-person span {
    color: #999999;
    font-size: 9px;
}


/* Compliance Status */
.equipment-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.equipment-status.compliant {
    background: #E8F5EE;
    color: #198754;
}

.equipment-status.expiring {
    background: #FFF4D6;
    color: #B77900;
}

.equipment-status.expired {
    background: #FBEAEC;
    color: #BF2532;
}


/* Reminders */
.equipment-reminders {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #555555;
    font-weight: 600;
}

.equipment-reminders svg {
    width: 13px;
    height: 13px;
}


/* More Button */
.equipment-more-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    color: #666666;
    cursor: pointer;
}

.equipment-more-btn:hover {
    background: #f7f7f7;
}

.equipment-more-btn svg {
    width: 14px;
    height: 14px;
}


/* =========================================================
   ADD EQUIPMENT MODAL
========================================================= */

#equipmentModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 20, 20, 0.45);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.equipment-modal-card {
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.equipment-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.equipment-modal-header h2 {
    margin: 0 0 4px;
    color: #252525;
    font-size: 18px;
}

.equipment-modal-header p {
    margin: 0;
    color: #888888;
    font-size: 11px;
}

.equipment-modal-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #777777;
    cursor: pointer;
}

.equipment-modal-close:hover {
    background: #f5f5f5;
}

.equipment-modal-close svg {
    width: 17px;
    height: 17px;
}

.equipment-modal-body {
    padding: 18px 20px;
    overflow-y: auto;
}

.equipment-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.equipment-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.equipment-form-group label {
    color: #444444;
    font-size: 10px;
    font-weight: 600;
}

.equipment-form-group input,
.equipment-form-group select,
.equipment-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 11px;
    outline: none;
}

.equipment-form-group input,
.equipment-form-group select {
    height: 38px;
    padding: 0 11px;
}

.equipment-form-group textarea {
    min-height: 85px;
    padding: 10px 11px;
    resize: vertical;
}

.equipment-form-group input:focus,
.equipment-form-group select:focus,
.equipment-form-group textarea:focus {
    border-color: #BF2532;
}

.equipment-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
}

.equipment-cancel-btn,
.equipment-save-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border-radius: 7px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.equipment-cancel-btn {
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #555555;
}

.equipment-save-btn {
    border: 1px solid #BF2532;
    background: #BF2532;
    color: #ffffff;
}

.equipment-save-btn svg {
    width: 14px;
    height: 14px;
}


/* Responsive */
@media (max-width: 1000px) {

    .equipment-page > .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

}

@media (max-width: 700px) {

    .equipment-page > .page-header {
        flex-direction: column;
    }

    .equipment-page > .page-header .page-primary-btn {
        margin-left: 0 !important;
    }

    .equipment-page > .summary-grid {
        grid-template-columns: 1fr !important;
    }

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

    .equipment-search,
    .equipment-filters select {
        width: 100%;
    }

    .equipment-form-grid {
        grid-template-columns: 1fr;
    }

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

}

/* =========================================================
   LOCATIONS PAGE
========================================================= */

.locations-page {
    width: 100%;
    max-width: none;
}


/* Page Header */
.locations-page > .page-header {
    width: 100%;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px;
    margin-bottom: 20px !important;
}

.locations-page > .page-header > div {
    flex: 1;
}

.locations-page > .page-header h1 {
    margin: 0 0 5px !important;
}

.locations-page > .page-header p {
    margin: 0 !important;
}

.locations-page > .page-header .page-primary-btn {
    flex-shrink: 0;
    margin: 0 0 0 auto !important;
}


/* Summary Cards */
.locations-page > .summary-grid {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 0 14px !important;
}

.locations-page > .summary-grid .summary-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}


/* Main Panel */
.locations-list-panel {
    width: 100%;
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    overflow: hidden;
}


/* Panel Header */
.locations-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    border-bottom: 1px solid #eeeeee;
}

.locations-panel-header h2 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 700;
    color: #252525;
}

.locations-panel-header p {
    margin: 0;
    font-size: 10px;
    color: #8a8a8a;
}

.locations-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #666666;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}


/* Filters */
.locations-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-bottom: 1px solid #eeeeee;
}

.locations-search {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.locations-search svg {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 14px;
    height: 14px;
    color: #8a8a8a;
    transform: translateY(-50%);
    pointer-events: none;
}

.locations-search input {
    width: 100%;
    height: 36px;
    box-sizing: border-box;
    padding: 0 12px 0 34px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #252525;
    font-family: inherit;
    font-size: 11px;
    outline: none;
}

.locations-search input:focus {
    border-color: #BF2532;
}

.locations-filters select {
    height: 36px;
    min-width: 140px;
    padding: 0 32px 0 11px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #555555;
    font-family: inherit;
    font-size: 11px;
    outline: none;
}

.locations-filters select:focus {
    border-color: #BF2532;
}


/* Table */
.locations-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.locations-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.locations-table thead {
    background: #fafafa;
}

.locations-table th {
    padding: 10px 12px;
    border-bottom: 1px solid #eeeeee;
    color: #777777;
    font-size: 9px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.locations-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eeeeee;
    color: #555555;
    font-size: 10px;
    vertical-align: middle;
}

.locations-table tbody tr:last-child td {
    border-bottom: 0;
}

.locations-table tbody tr:hover {
    background: #fcfcfc;
}


/* Location Info */
.location-info {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 200px;
}

.location-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #FBEAEC;
    color: #BF2532;
}

.location-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 1.8;
}

.location-info > div:last-child,
.location-person {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.location-info strong,
.location-person strong {
    color: #252525;
    font-size: 10px;
    font-weight: 600;
}

.location-info span,
.location-person span {
    color: #999999;
    font-size: 9px;
}


/* Compliance */
.location-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.location-status.compliant {
    background: #E8F5EE;
    color: #198754;
}

.location-status.expiring {
    background: #FFF4D6;
    color: #B77900;
}

.location-status.expired {
    background: #FBEAEC;
    color: #BF2532;
}


/* Reminders */
.location-reminders {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #555555;
    font-weight: 600;
}

.location-reminders svg {
    width: 13px;
    height: 13px;
}


/* More Button */
.location-more-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    color: #666666;
    cursor: pointer;
}

.location-more-btn:hover {
    background: #f7f7f7;
}

.location-more-btn svg {
    width: 14px;
    height: 14px;
}


/* =========================================================
   ADD LOCATION MODAL
========================================================= */

#locationModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 20, 20, 0.45);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.location-modal-card {
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.location-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.location-modal-header h2 {
    margin: 0 0 4px;
    color: #252525;
    font-size: 18px;
}

.location-modal-header p {
    margin: 0;
    color: #888888;
    font-size: 11px;
}

.location-modal-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #777777;
    cursor: pointer;
}

.location-modal-close:hover {
    background: #f5f5f5;
}

.location-modal-close svg {
    width: 17px;
    height: 17px;
}

.location-modal-body {
    padding: 18px 20px;
    overflow-y: auto;
}

.location-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.location-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.location-form-group label {
    color: #444444;
    font-size: 10px;
    font-weight: 600;
}

.location-form-group input,
.location-form-group select,
.location-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 11px;
    outline: none;
}

.location-form-group input,
.location-form-group select {
    height: 38px;
    padding: 0 11px;
}

.location-form-group textarea {
    min-height: 75px;
    padding: 10px 11px;
    resize: vertical;
}

.location-form-group input:focus,
.location-form-group select:focus,
.location-form-group textarea:focus {
    border-color: #BF2532;
}

.location-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
}

.location-cancel-btn,
.location-save-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border-radius: 7px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.location-cancel-btn {
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #555555;
}

.location-save-btn {
    border: 1px solid #BF2532;
    background: #BF2532;
    color: #ffffff;
}

.location-save-btn svg {
    width: 14px;
    height: 14px;
}


/* Responsive */
@media (max-width: 1000px) {

    .locations-page > .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

}

@media (max-width: 700px) {

    .locations-page > .page-header {
        flex-direction: column;
    }

    .locations-page > .page-header .page-primary-btn {
        margin-left: 0 !important;
    }

    .locations-page > .summary-grid {
        grid-template-columns: 1fr !important;
    }

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

    .locations-search,
    .locations-filters select {
        width: 100%;
    }

    .location-form-grid {
        grid-template-columns: 1fr;
    }

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

}

/* =========================================================
   Companies
   ========================================================= */

.companies-page {
    width: 100%;
    max-width: none;
}

.companies-page > .page-header {
    width: 100%;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 24px;
    margin-bottom: 20px !important;
}

.companies-page > .page-header > div {
    flex: 1;
}

.companies-page > .page-header h1 {
    margin: 0 0 5px !important;
}

.companies-page > .page-header p {
    margin: 0 !important;
}

.companies-page > .page-header .page-primary-btn {
    flex-shrink: 0;
    margin: 0 0 0 auto !important;
}

/* Summary cards */

.companies-page > .summary-grid {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 0 14px !important;
}

.companies-page > .summary-grid .summary-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

/* Main panel */

.companies-list-panel {
    width: 100%;
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 14px;
    overflow: hidden;
}

.companies-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
}

.companies-panel-header h2 {
    margin: 0 0 5px;
    font-size: 17px;
    font-weight: 700;
    color: #252525;
}

.companies-panel-header p {
    margin: 0;
    font-size: 12px;
    color: #737373;
}

/* Toolbar */

.companies-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 22px 16px;
}

.companies-search {
    position: relative;
    flex: 1;
    max-width: 420px;
}

.companies-search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 15px;
    height: 15px;
    color: #8a8a8a;
    transform: translateY(-50%);
    pointer-events: none;
}

.companies-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 37px;
    border: 1px solid #e1e3e8;
    border-radius: 8px;
    background: #ffffff;
    color: #252525;
    font-family: inherit;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}

.companies-search input:focus {
    border-color: #BF2532;
}

.companies-toolbar select {
    height: 38px;
    min-width: 140px;
    padding: 0 34px 0 12px;
    border: 1px solid #e1e3e8;
    border-radius: 8px;
    background: #ffffff;
    color: #444444;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

/* Table */

.companies-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.companies-table {
    width: 100%;
    border-collapse: collapse;
}

.companies-table th {
    padding: 11px 16px;
    background: #fafafa;
    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
    color: #777777;
    font-size: 10px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.companies-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333333;
    font-size: 12px;
    vertical-align: middle;
}

.companies-table tbody tr:last-child td {
    border-bottom: 0;
}

.companies-table tbody tr:hover {
    background: #fcfcfc;
}

.company-cell {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 190px;
}

.company-avatar {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 9px;
    background: #FBEAEC;
    color: #BF2532;
}

.company-avatar svg {
    width: 16px;
    height: 16px;
}

.company-cell > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.company-cell strong,
.companies-table td > strong {
    color: #252525;
    font-size: 12px;
    font-weight: 600;
}

.company-cell span,
.company-subtext {
    display: block;
    margin-top: 3px;
    color: #8a8a8a;
    font-size: 10px;
    white-space: nowrap;
}

.company-document-count {
    display: inline-flex;
    min-width: 28px;
    height: 25px;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 7px;
    background: #f4f5f7;
    color: #444444;
    font-size: 11px;
    font-weight: 600;
}

.company-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.company-status.active {
    background: #E8F5EE;
    color: #198754;
}

.company-status.inactive {
    background: #f1f1f1;
    color: #777777;
}

.company-action-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #777777;
    cursor: pointer;
}

.company-action-btn:hover {
    background: #f3f3f3;
    color: #252525;
}

.company-action-btn svg {
    width: 16px;
    height: 16px;
}

/* Company modal */

.company-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 20, 20, 0.45);
}

.company-modal-backdrop.show {
    display: flex;
}

.company-modal {
    width: 100%;
    max-width: 650px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.company-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #eeeeee;
}

.company-modal-header h2 {
    margin: 0 0 5px;
    color: #252525;
    font-size: 18px;
}

.company-modal-header p {
    margin: 0;
    color: #777777;
    font-size: 11px;
}

.company-modal-header > button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #777777;
    cursor: pointer;
}

.company-modal-header > button:hover {
    background: #f5f5f5;
}

.company-modal-header > button svg {
    width: 17px;
    height: 17px;
}

.company-modal-body {
    padding: 20px 22px;
    overflow-y: auto;
}

.company-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.company-form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

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

.company-form-group label {
    color: #444444;
    font-size: 11px;
    font-weight: 600;
}

.company-form-group label span {
    color: #BF2532;
}

.company-form-group input,
.company-form-group select,
.company-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e1e3e8;
    border-radius: 8px;
    background: #ffffff;
    color: #252525;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

.company-form-group input,
.company-form-group select {
    height: 39px;
    padding: 0 11px;
}

.company-form-group textarea {
    padding: 10px 11px;
    resize: vertical;
}

.company-form-group input:focus,
.company-form-group select:focus,
.company-form-group textarea:focus {
    border-color: #BF2532;
}

.company-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 22px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
}

.company-cancel-btn {
    height: 38px;
    padding: 0 16px;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #ffffff;
    color: #555555;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.company-cancel-btn:hover {
    background: #f7f7f7;
}

/* Responsive */

@media (max-width: 1000px) {
    .companies-page > .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    .companies-page > .page-header {
        flex-direction: column;
    }

    .companies-page > .page-header .page-primary-btn {
        margin-left: 0 !important;
    }

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

    .companies-search {
        max-width: none;
    }

    .company-form-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 600px) {
    .companies-page > .summary-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   Contacts
========================================================= */

.contacts-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.contacts-page-header h1 {
    margin-bottom: 6px;
}

.contacts-page-header p {
    margin: 0;
    color: #737373;
}

.contacts-primary-btn {
    border: 0;
    background: #BF2532;
    color: #ffffff;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.contacts-primary-btn svg {
    width: 17px;
    height: 17px;
}

/* Full width dashboard-style cards */

.contacts-summary-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.contacts-summary-grid .summary-card {
    width: 100%;
    min-width: 0;
}

.contacts-panel {
    width: 100%;
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #E9E9E9;
    border-radius: 12px;
    overflow: hidden;
}

.contacts-panel-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #EEEEEE;
}

.contacts-panel-header h2 {
    margin: 0 0 5px;
    font-size: 18px;
}

.contacts-panel-header p {
    margin: 0;
    color: #737373;
    font-size: 13px;
}

.contacts-toolbar {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #EEEEEE;
}

.contacts-search {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.contacts-search svg {
    position: absolute;
    width: 17px;
    height: 17px;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B8B8B;
    pointer-events: none;
}

.contacts-search input,
.contacts-filter {
    width: 100%;
    height: 40px;
    border: 1px solid #E2E2E2;
    border-radius: 8px;
    background: #ffffff;
    font: inherit;
    font-size: 13px;
    outline: none;
}

.contacts-search input {
    padding: 0 12px 0 38px;
}

.contacts-filter {
    width: 160px;
    padding: 0 10px;
    color: #444444;
}

.contacts-search input:focus,
.contacts-filter:focus,
.contact-form-group input:focus,
.contact-form-group select:focus,
.contact-form-group textarea:focus {
    border-color: #BF2532;
}

.contacts-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.contacts-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
}

.contacts-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #717171;
    background: #FAFAFA;
    border-bottom: 1px solid #EEEEEE;
}

.contacts-table td {
    padding: 14px 16px;
    font-size: 13px;
    color: #343434;
    border-bottom: 1px solid #F0F0F0;
    vertical-align: middle;
}

.contacts-table tbody tr:last-child td {
    border-bottom: 0;
}

.contacts-table tbody tr:hover {
    background: #FCFCFC;
}

.contact-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #FBEAEC;
    color: #BF2532;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
}

.contact-person strong {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
}

.contact-person span,
.contact-subtext {
    display: block;
    margin-top: 3px;
    color: #858585;
    font-size: 11px;
}

.contact-group-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #FFF4D6;
    color: #916600;
    font-size: 11px;
    font-weight: 600;
}

.contact-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.contact-status.active {
    background: #E8F5EE;
    color: #198754;
}

.contact-status.inactive {
    background: #F1F1F1;
    color: #777777;
}

.contact-action-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #555555;
    cursor: pointer;
}

.contact-action-btn:hover {
    border-color: #BF2532;
    color: #BF2532;
}

.contact-action-btn svg {
    width: 15px;
    height: 15px;
}

/* Contact modal */

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(18, 18, 18, 0.45);
}

.contact-modal.show {
    display: flex;
}

.contact-modal-dialog {
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
}

.contact-modal-header {
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #EEEEEE;
}

.contact-modal-header h2 {
    margin: 0 0 5px;
    font-size: 19px;
}

.contact-modal-header p {
    margin: 0;
    color: #777777;
    font-size: 13px;
}

.contact-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #F5F5F5;
    color: #555555;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.contact-modal-close svg {
    width: 17px;
    height: 17px;
}

.contact-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.contact-form-group {
    display: flex;
    flex-direction: column;
}

.contact-form-group label {
    margin-bottom: 7px;
    color: #404040;
    font-size: 12px;
    font-weight: 600;
}

.contact-form-group label span {
    color: #BF2532;
}

.contact-form-group input,
.contact-form-group select,
.contact-form-group textarea {
    width: 100%;
    border: 1px solid #E1E1E1;
    border-radius: 8px;
    background: #ffffff;
    padding: 0 11px;
    color: #333333;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.contact-form-group input,
.contact-form-group select {
    height: 40px;
}

.contact-form-group textarea {
    padding-top: 10px;
    padding-bottom: 10px;
    resize: vertical;
}

.contact-form-group small {
    margin-top: 5px;
    color: #888888;
    font-size: 10px;
    line-height: 1.4;
}

.contact-phone-field {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px;
}

.contact-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #EEEEEE;
}

.contact-section-heading h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.contact-section-heading p {
    margin: 0;
    color: #7B7B7B;
    font-size: 11px;
}

.contact-channel-list {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.contact-channel-option {
    position: relative;
    padding: 12px;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.contact-channel-option input {
    position: absolute;
    top: 9px;
    right: 9px;
}

.contact-channel-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #FBEAEC;
    color: #BF2532;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-channel-icon svg {
    width: 16px;
    height: 16px;
}

.contact-channel-option strong {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
}

.contact-channel-option span {
    display: block;
    padding-right: 8px;
    color: #858585;
    font-size: 10px;
    line-height: 1.3;
}

.contact-notes {
    margin-top: 18px;
}

.contact-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #EEEEEE;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.contact-secondary-btn {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    background: #ffffff;
    color: #444444;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Contacts responsive */

@media (max-width: 1000px) {
    .contacts-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .contacts-toolbar {
        flex-wrap: wrap;
    }

    .contacts-search {
        flex-basis: 100%;
    }

    .contacts-filter {
        flex: 1;
    }

    .contact-channel-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .contacts-page-header {
        flex-direction: column;
    }

    .contacts-primary-btn {
        width: 100%;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .contact-modal {
        padding: 10px;
    }

    .contact-modal-dialog {
        max-height: calc(100vh - 20px);
    }
}

@media (max-width: 600px) {
    .contacts-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Contacts - Document Type Automation */

.contact-document-types {
    margin-top: 14px;
    border: 1px solid #E8E8E8;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.contact-document-type-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    margin: 0;
    border-bottom: 1px solid #EEEEEE;
    color: #333333;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.contact-document-type-row:last-child {
    border-bottom: 0;
}

.contact-document-type-row:hover {
    background: #FCFCFC;
}

.contact-document-type-row input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #BF2532;
}

/* =========================================================
   Reminder Sequence
========================================================= */

.reminder-sequence-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.reminder-sequence-page-header h1 {
    margin: 0 0 6px;
}

.reminder-sequence-page-header p {
    margin: 0;
    color: #737373;
}

.sequence-primary-btn {
    height: 36px;
    padding: 0 15px;
    border: 1px solid #bf2532;
    border-radius: 7px;
    background: #bf2532;
    color: #ffffff;

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

    font-size: 9px;
    font-weight: 600;

    cursor: pointer;
    white-space: nowrap;

    box-shadow: 0 4px 10px rgba(191, 37, 50, 0.12);
}

.sequence-primary-btn:hover {
    background: #aa1f2c;
    border-color: #aa1f2c;
}

.sequence-primary-btn svg {
    width: 13px;
    height: 13px;
}
.reminder-sequence-summary-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.reminder-sequence-summary-grid .summary-card {
    width: 100%;
    min-width: 0;
}

.sequence-panel {
    width: 100%;
    background: #ffffff;
    border: 1px solid #E9E9E9;
    border-radius: 12px;
    overflow: hidden;
}

.sequence-panel-header {
    padding: 20px;
    border-bottom: 1px solid #EEEEEE;
}

.sequence-panel-header h2 {
    margin: 0 0 5px;
    font-size: 18px;
}

.sequence-panel-header p {
    margin: 0;
    color: #737373;
    font-size: 13px;
}

.sequence-toolbar {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #EEEEEE;
}

.sequence-search {
    position: relative;
    flex: 1;
}

.sequence-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 17px;
    height: 17px;
    color: #8B8B8B;
    transform: translateY(-50%);
}

.sequence-search input,
.sequence-filter {
    height: 40px;
    border: 1px solid #E2E2E2;
    border-radius: 8px;
    background: #ffffff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.sequence-search input {
    width: 100%;
    padding: 0 12px 0 38px;
}

.sequence-filter {
    width: 170px;
    padding: 0 10px;
}

.sequence-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.sequence-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.sequence-table th {
    padding: 12px 16px;
    background: #FAFAFA;
    border-bottom: 1px solid #EEEEEE;
    color: #717171;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.sequence-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #F0F0F0;
    color: #343434;
    font-size: 13px;
    vertical-align: middle;
}

.sequence-table tbody tr:last-child td {
    border-bottom: 0;
}

.sequence-name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
}

.sequence-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #FBEAEC;
    color: #BF2532;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sequence-icon svg {
    width: 17px;
    height: 17px;
}

.sequence-name strong {
    display: block;
    margin-bottom: 3px;
}

.sequence-name span {
    display: block;
    color: #858585;
    font-size: 11px;
}

.sequence-recipient-text {
    color: #555555;
    font-size: 12px;
}

.sequence-status,
.sequence-default-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.sequence-status.active {
    background: #E8F5EE;
    color: #198754;
}

.sequence-default-badge {
    background: #FFF4D6;
    color: #916600;
}

.sequence-not-default {
    color: #AAAAAA;
}

.sequence-action-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    background: #ffffff;
    color: #555555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sequence-action-btn svg {
    width: 15px;
    height: 15px;
}

/* Sequence Modal */

.sequence-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(18, 18, 18, 0.45);
}

.sequence-modal.show {
    display: flex;
}

.sequence-modal-dialog {
    width: min(900px, 100%);
    max-height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sequence-modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid #EEEEEE;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.sequence-modal-header h2 {
    margin: 0 0 5px;
    font-size: 19px;
}

.sequence-modal-header p {
    margin: 0;
    color: #777777;
    font-size: 13px;
}

.sequence-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555555;
    cursor: pointer;
}

.sequence-modal-close svg {
    width: 17px;
    height: 17px;
}

.sequence-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.sequence-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.sequence-form-group {
    display: flex;
    flex-direction: column;
}

.sequence-form-group label {
    margin-bottom: 7px;
    color: #404040;
    font-size: 12px;
    font-weight: 600;
}

.sequence-form-group label span {
    color: #BF2532;
}

.sequence-form-group input,
.sequence-form-group select,
.sequence-form-group textarea {
    width: 100%;
    border: 1px solid #E1E1E1;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.sequence-form-group input,
.sequence-form-group select {
    height: 40px;
    padding: 0 11px;
}

.sequence-form-group textarea {
    padding: 10px 11px;
    resize: vertical;
}

.sequence-form-group small {
    margin-top: 6px;
    color: #858585;
    font-size: 10px;
    line-height: 1.5;
}

.sequence-full-width {
    grid-column: 1 / -1;
}

.sequence-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.sequence-checkbox-label input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #BF2532;
}

.sequence-checkbox-label span {
    color: #333333 !important;
}

.sequence-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #EEEEEE;
}

.sequence-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.sequence-section-header h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.sequence-section-header p {
    margin: 0;
    color: #7B7B7B;
    font-size: 11px;
}

.sequence-add-step-btn {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #E1E1E1;
    border-radius: 8px;
    background: #ffffff;
    color: #444444;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.sequence-add-step-btn svg {
    width: 14px;
    height: 14px;
}

.sequence-step {
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #E7E7E7;
    border-radius: 10px;
    background: #FAFAFA;
}

.sequence-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.sequence-remove-step-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: #FBEAEC;
    color: #BF2532;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sequence-remove-step-btn svg {
    width: 14px;
    height: 14px;
}

.sequence-step-grid {
    display: grid;
    grid-template-columns: 0.7fr 1fr 1.7fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.sequence-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sequence-recipient-options {
    margin-top: 4px;
}

.sequence-recipient-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    cursor: pointer;
}

.sequence-recipient-option > input {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 15px;
    height: 15px;
    accent-color: #BF2532;
}

.sequence-recipient-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #FBEAEC;
    color: #BF2532;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sequence-recipient-icon svg {
    width: 17px;
    height: 17px;
}

.sequence-recipient-option strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
}

.sequence-recipient-option span {
    display: block;
    padding-right: 30px;
    color: #808080;
    font-size: 11px;
}

.sequence-extra-employees {
    margin-top: 16px;
}

.sequence-extra-employees select {
    height: auto;
    min-height: 112px;
    padding: 6px;
}

.sequence-extra-employees option {
    padding: 7px;
}

.sequence-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #EEEEEE;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.sequence-secondary-btn {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    background: #ffffff;
    color: #444444;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 1000px) {
    .reminder-sequence-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 700px) {
    .reminder-sequence-page-header {
        flex-direction: column;
    }

    .sequence-primary-btn {
        width: 100%;
    }

    .sequence-form-grid,
    .sequence-template-grid,
    .sequence-step-grid {
        grid-template-columns: 1fr;
    }

    .sequence-toolbar {
        flex-wrap: wrap;
    }

    .sequence-search,
    .sequence-filter {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .reminder-sequence-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Reminder Sequence - Default Employees */

.sequence-default-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sequence-default-badge svg {
    width: 12px;
    height: 12px;
}

.sequence-set-default-btn {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #E2E2E2;
    border-radius: 7px;
    background: #ffffff;
    color: #555555;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.sequence-set-default-btn:hover {
    border-color: #BF2532;
    color: #BF2532;
}

.sequence-employee-picker {
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.sequence-employee-search {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid #EEEEEE;
}

.sequence-employee-search svg {
    position: absolute;
    left: 24px;
    top: 50%;
    width: 16px;
    height: 16px;
    color: #8A8A8A;
    transform: translateY(-50%);
}

.sequence-employee-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 36px;
    border: 1px solid #E2E2E2;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

.sequence-employee-list {
    max-height: 210px;
    overflow-y: auto;
}

.sequence-employee-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    margin: 0;
    border-bottom: 1px solid #F0F0F0;
    cursor: pointer;
}

.sequence-employee-item:last-child {
    border-bottom: 0;
}

.sequence-employee-item:hover {
    background: #FCFCFC;
}

.sequence-employee-item > input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #BF2532;
}

.sequence-employee-avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #FBEAEC;
    color: #BF2532;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
}

.sequence-employee-info strong {
    display: block;
    margin-bottom: 3px;
    color: #333333;
    font-size: 12px;
}

.sequence-employee-info span {
    display: block;
    color: #858585;
    font-size: 10px;
}

.sequence-employee-help {
    display: block;
    margin-top: 7px;
    color: #858585;
    font-size: 10px;
}

/* =========================================================
   Document Types
========================================================= */

.document-types-page {
    width: 100%;
    max-width: none;
}

.document-types-page > .page-header {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.document-types-page > .page-header > div {
    flex: 1;
}

.document-types-page > .page-header h1 {
    margin: 0 0 5px;
}

.document-types-page > .page-header p {
    margin: 0;
}

.document-types-page > .page-header .page-primary-btn {
    flex-shrink: 0;
    margin-left: auto;
}

.document-types-page > .summary-grid {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}

.document-types-page > .summary-grid .summary-card {
    width: 100%;
    min-width: 0;
    max-width: none;
}


/* Main Panel */

.document-types-panel {
    width: 100%;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    overflow: hidden;
}

.document-types-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.document-types-panel-header h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #252525;
}

.document-types-panel-header p {
    margin: 0;
    font-size: 12px;
    color: #737373;
}


/* Toolbar */

.document-types-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid #f1f1f1;
}

.document-types-search {
    position: relative;
    flex: 1;
}

.document-types-search svg {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 15px;
    height: 15px;
    transform: translateY(-50%);
    color: #8a8a8a;
    pointer-events: none;
}

.document-types-search input,
.document-types-filter {
    width: 100%;
    height: 38px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

.document-types-search input {
    padding: 0 12px 0 38px;
}

.document-types-filter {
    width: 150px;
    padding: 0 10px;
}

.document-types-search input:focus,
.document-types-filter:focus {
    border-color: #BF2532;
}


/* Table */

.document-types-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.document-types-table {
    width: 100%;
    border-collapse: collapse;
}

.document-types-table th {
    padding: 11px 20px;
    background: #fafafa;
    border-bottom: 1px solid #eeeeee;
    color: #777777;
    font-size: 10px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.document-types-table td {
    padding: 13px 20px;
    border-bottom: 1px solid #f1f1f1;
    color: #333333;
    font-size: 12px;
    vertical-align: middle;
}

.document-types-table tbody tr:last-child td {
    border-bottom: 0;
}

.document-types-table tbody tr:hover {
    background: #fcfcfc;
}

.document-type-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.document-type-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: #FBEAEC;
    color: #BF2532;
}

.document-type-icon svg {
    width: 15px;
    height: 15px;
}


/* Expiry / Status */

.expiry-tracking,
.document-type-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.expiry-tracking svg {
    width: 11px;
    height: 11px;
}

.expiry-tracking.yes {
    color: #B77900;
    background: #FFF4D6;
}

.expiry-tracking.no {
    color: #737373;
    background: #F2F2F2;
}

.document-type-status.active {
    color: #198754;
    background: #E8F5EE;
}

.document-type-status.inactive {
    color: #737373;
    background: #F2F2F2;
}


/* Reminder Sequence */

.document-sequence-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 20px;
    background: #E8F5EE;
    color: #198754;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.document-sequence-badge.urgent {
    background: #FBEAEC;
    color: #BF2532;
}

.document-sequence-none {
    color: #8A8A8A;
    font-size: 11px;
}


/* Action */

.document-type-action-column {
    width: 80px;
    text-align: center !important;
}

.document-types-table td:last-child {
    text-align: center;
}

.document-type-action-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 7px;
    background: #ffffff;
    color: #737373;
    cursor: pointer;
}

.document-type-action-btn:hover {
    border-color: #BF2532;
    color: #BF2532;
    background: #FBEAEC;
}

.document-type-action-btn svg {
    width: 13px;
    height: 13px;
}


/* =========================================================
   Document Type Modal
========================================================= */

.document-type-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(23, 27, 33, 0.52);
}

.document-type-modal-backdrop.show {
    display: flex;
}

.document-type-modal {
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.document-type-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #eeeeee;
}

.document-type-modal-header h2 {
    margin: 0 0 4px;
    color: #252525;
    font-size: 17px;
    font-weight: 700;
}

.document-type-modal-header p {
    margin: 0;
    color: #737373;
    font-size: 11px;
}

.document-type-modal-close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e4e4e4;
    border-radius: 7px;
    background: #ffffff;
    color: #777777;
    cursor: pointer;
}

.document-type-modal-close:hover {
    color: #BF2532;
    background: #FBEAEC;
    border-color: #f1c8cc;
}

.document-type-modal-close svg {
    width: 15px;
    height: 15px;
}

.document-type-modal-body {
    padding: 20px;
}


/* Form */

.document-type-form-group {
    margin-bottom: 16px;
}

.document-type-form-group:last-child {
    margin-bottom: 0;
}

.document-type-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333333;
    font-size: 11px;
    font-weight: 600;
}

.document-type-form-group label span {
    color: #BF2532;
}

.document-type-form-group input,
.document-type-form-group select,
.document-type-form-group textarea {
    width: 100%;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}

.document-type-form-group input,
.document-type-form-group select {
    height: 40px;
    padding: 0 11px;
}

.document-type-form-group textarea {
    min-height: 90px;
    padding: 10px 11px;
    resize: vertical;
}

.document-type-form-group input:focus,
.document-type-form-group select:focus,
.document-type-form-group textarea:focus {
    border-color: #BF2532;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.07);
}

.document-type-form-group small {
    display: block;
    margin-top: 6px;
    color: #858585;
    font-size: 10px;
    line-height: 1.5;
}


/* Modal Footer */

.document-type-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 15px 20px 20px;
    border-top: 1px solid #eeeeee;
}

.document-type-cancel-btn {
    height: 38px;
    padding: 0 16px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #ffffff;
    color: #555555;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.document-type-cancel-btn:hover {
    background: #f7f7f7;
}


/* =========================================================
   Document Types Responsive
========================================================= */

@media (max-width: 1000px) {
    .document-types-page > .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .document-types-page > .page-header {
        flex-direction: column;
    }

    .document-types-page > .page-header .page-primary-btn {
        margin-left: 0;
    }

    .document-types-page > .summary-grid {
        grid-template-columns: 1fr;
    }

    .document-types-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .document-types-filter {
        width: 100%;
    }

    .document-type-modal-backdrop {
        padding: 12px;
    }
}

/* =========================================================
   Documents - Actions & Details
========================================================= */

.document-action-wrap {
    position: relative;
    display: inline-flex;
}

.document-action-menu {
    position: fixed;
    z-index: 100000;

    width: 160px;
    display: none;

    padding: 5px;

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

    background: #ffffff;

    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
}

.document-action-menu.show {
    display: block;
}

.document-action-menu button {
    width: 100%;
    min-height: 33px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #555555;
    font-size: 10px;
    text-align: left;
    cursor: pointer;
}

.document-action-menu button:hover {
    background: #f6f7f8;
    color: #252525;
}

.document-action-menu button.danger {
    color: #BF2532;
}

.document-action-menu button.danger:hover {
    background: #FBEAEC;
}

.document-action-menu button svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.document-action-divider {
    height: 1px;
    margin: 4px 2px;
    background: #eeeeee;
}


/* Document Details */

.document-details-modal {
    max-width: 620px;
}

.document-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.document-details-grid > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    background: #fafafa;
}

.document-details-grid span,
.document-details-grid strong {
    display: block;
}

.document-details-grid span {
    margin-bottom: 5px;
    color: #8a8a8a;
    font-size: 9px;
}

.document-details-grid strong {
    overflow: hidden;
    color: #333333;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-details-notes {
    margin-top: 12px;
    padding: 11px 12px;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    background: #fafafa;
}

.document-details-notes > span {
    display: block;
    margin-bottom: 6px;
    color: #8a8a8a;
    font-size: 9px;
}

.document-details-notes p {
    margin: 0;
    color: #444444;
    font-size: 11px;
    line-height: 1.5;
}


@media (max-width: 600px) {

    .document-details-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Document Details Modal
========================================================= */

#documentDetailsModal {
    position: fixed;
    inset: 0;
    z-index: 99999;

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

    padding: 24px;

    background: rgba(20, 24, 32, 0.45);
    backdrop-filter: blur(2px);

    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

#documentDetailsModal.active {
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

#documentDetailsModal .modal-card {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);

    overflow-y: auto;

    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;

    box-shadow: 0 20px 60px rgba(20, 24, 32, 0.18);
}

#documentDetailsModal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 18px 20px;

    border-bottom: 1px solid #eeeeee;
}

#documentDetailsModal .modal-header h2 {
    margin: 0;

    color: #252525;

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

#documentDetailsModal .modal-header p {
    margin: 4px 0 0;

    color: #8a8a8a;

    font-size: 9px;
}

#documentDetailsModal .modal-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;

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

    padding: 0;

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

    background: #ffffff;
    color: #777777;

    cursor: pointer;
}

#documentDetailsModal .modal-close:hover {
    color: #bf2532;
    border-color: #efc7cb;
    background: #fbeaec;
}

#documentDetailsModal .modal-close svg {
    width: 15px;
    height: 15px;
}

#documentDetailsModal .modal-body {
    padding: 18px 20px;
}

#documentDetailsModal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;

    padding: 14px 20px;

    border-top: 1px solid #eeeeee;

    background: #fafafa;

    border-radius: 0 0 14px 14px;
}

@media (max-width: 640px) {

    #documentDetailsModal {
        padding: 12px;
    }

    #documentDetailsModal .modal-card {
        max-height: calc(100vh - 24px);
    }
}

.document-filter-apply {
    height: 36px;
    flex-shrink: 0;
}

/* Documents - Reminder Sequence Helper */

#uploadDocumentModal .form-group small {
    display: block;
    margin-top: 4px;

    color: #8a8a8a;

    font-size: 8px;
    line-height: 1.35;
}

#uploadDocumentModal #documentReminderSequence {
    margin-bottom: 0;
}

/* =========================================================
   Templates
========================================================= */

.templates-page {
    width: 100%;
    max-width: none;
}

.templates-page > .page-header {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.templates-page > .page-header > div {
    flex: 1;
}

.templates-page > .page-header h1 {
    margin: 0 0 5px;
}

.templates-page > .page-header p {
    margin: 0;
}

.templates-page > .page-header .page-primary-btn {
    flex-shrink: 0;
    margin-left: auto;
}

.templates-page > .summary-grid {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 14px;
}

.templates-page > .summary-grid .summary-card {
    width: 100%;
    min-width: 0;
    max-width: none;
}


/* Main Panel */

.templates-panel {
    width: 100%;
    max-width: none;
    overflow: hidden;
}

.templates-count {
    color: #8a8a8a;
    font-size: 10px;
}


/* Toolbar */

.templates-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 16px;
    border-bottom: 1px solid #eeeeee;
    background: #fafafa;
}

.templates-search {
    position: relative;
    flex: 1;
}

.templates-search svg {
    position: absolute;
    top: 50%;
    left: 11px;
    width: 14px;
    height: 14px;
    color: #8a8a8a;
    transform: translateY(-50%);
    pointer-events: none;
}

.templates-search input,
.templates-toolbar select {
    height: 36px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #444444;
    font-size: 10px;
}

.templates-search input {
    width: 100%;
    padding: 0 11px 0 34px;
}

.templates-toolbar select {
    min-width: 135px;
    padding: 0 10px;
}

.templates-search input:focus,
.templates-toolbar select:focus {
    border-color: #bf2532;
}

.template-filter-apply {
    height: 36px;
    flex-shrink: 0;
}


/* Table */

.templates-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.templates-table {
    width: 100%;
    border-collapse: collapse;
}

.templates-table th {
    padding: 11px 16px;
    background: #fafafa;
    border-bottom: 1px solid #eeeeee;
    color: #737373;
    font-size: 9px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.templates-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #444444;
    font-size: 11px;
    vertical-align: middle;
}

.templates-table tbody tr:last-child td {
    border-bottom: 0;
}

.templates-table tbody tr:hover {
    background: #fcfcfc;
}


/* Template Name */

.template-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-name-cell > div {
    min-width: 0;
}

.template-name-cell strong,
.template-name-cell > div span {
    display: block;
}

.template-name-cell strong {
    margin-bottom: 2px;
    color: #252525;
    font-size: 11px;
}

.template-name-cell > div span {
    color: #8a8a8a;
    font-size: 9px;
}


/* Icons */

.template-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;

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

    border-radius: 9px;
}

.template-icon svg {
    width: 15px;
    height: 15px;
    display: block;
    stroke-width: 1.8;
}

.template-icon.email {
    color: #1686a7;
    background: #e8f8fd;
}

.template-icon.urgent {
    color: #bf2532;
    background: #fbeaec;
}

.template-icon.sms {
    color: #6254c7;
    background: #efedff;
}

.template-icon.whatsapp {
    color: #198754;
    background: #e8f5ee;
}

.template-icon.event {
    color: #b77900;
    background: #fff4d6;
}


/* Channel & Status */

.template-channel,
.template-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.template-channel.email {
    color: #1686a7;
    background: #e8f8fd;
}

.template-channel.sms {
    color: #6254c7;
    background: #efedff;
}

.template-channel.whatsapp {
    color: #198754;
    background: #e8f5ee;
}

.template-status.active {
    color: #198754;
    background: #e8f5ee;
}

.template-status.inactive {
    color: #777777;
    background: #f1f1f1;
}


/* Action */

.template-action-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e4e4e4;
    border-radius: 7px;
    background: #ffffff;
    color: #777777;
    cursor: pointer;
}

.template-action-btn:hover {
    color: #bf2532;
    border-color: #efc7cb;
    background: #fbeaec;
}

.template-action-btn svg {
    width: 13px;
    height: 13px;
}


/* =========================================================
   Template Modal
========================================================= */

.template-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 24, 32, 0.45);
    backdrop-filter: blur(2px);
}

.template-modal-overlay.show {
    display: flex;
}

.template-modal {
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(20, 24, 32, 0.18);
}

.template-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.template-modal-header h2 {
    margin: 0;
    color: #252525;
    font-size: 16px;
    font-weight: 700;
}

.template-modal-header p {
    margin: 4px 0 0;
    color: #8a8a8a;
    font-size: 9px;
}

.template-modal-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e6e6e6;
    border-radius: 7px;
    background: #ffffff;
    color: #777777;
    cursor: pointer;
}

.template-modal-close:hover {
    color: #bf2532;
    border-color: #efc7cb;
    background: #fbeaec;
}

.template-modal-close svg {
    width: 15px;
    height: 15px;
}

.template-modal-body {
    padding: 18px 20px;
}

.template-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.template-form-group {
    margin-bottom: 14px;
}

.template-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #454545;
    font-size: 10px;
    font-weight: 600;
}

.template-form-group label span {
    color: #bf2532;
}

.template-form-group input,
.template-form-group select,
.template-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dddddd;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 10px;
}

.template-form-group input,
.template-form-group select {
    height: 38px;
    padding: 0 10px;
}

.template-form-group textarea {
    min-height: 140px;
    padding: 10px;
    resize: vertical;
}

.template-form-group input:focus,
.template-form-group select:focus,
.template-form-group textarea:focus {
    border-color: #dca3a8;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.06);
}

.template-form-group small {
    display: block;
    margin-top: 5px;
    color: #8a8a8a;
    font-size: 8px;
    line-height: 1.4;
}

.template-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
    background: #fafafa;
}

.template-cancel-btn {
    height: 36px;
    padding: 0 14px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #ffffff;
    color: #555555;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.template-cancel-btn:hover {
    background: #f7f7f7;
}


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

@media (max-width: 1000px) {

    .templates-page > .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {

    .templates-toolbar {
        flex-wrap: wrap;
    }

    .templates-search {
        flex-basis: 100%;
    }

    .template-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {

    .templates-page > .page-header {
        flex-direction: column;
    }

    .templates-page > .page-header .page-primary-btn {
        margin-left: 0;
    }

    .templates-page > .summary-grid {
        grid-template-columns: 1fr;
    }

    .template-modal-overlay {
        padding: 12px;
    }
}

/* =========================================================
   INBOX
   ========================================================= */

.inbox-page {
    width: 100%;
}

.inbox-panel {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}


/* Search */

.inbox-search-row {
    padding: 14px 16px;
    border-bottom: 1px solid #eeeeee;
}

.inbox-search-box {
    position: relative;
    width: 100%;
}

.inbox-search-box svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 16px;
    height: 16px;
    color: #8a9099;
    transform: translateY(-50%);
}

.inbox-search-box input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 41px;
    color: #252525;
    font-size: 11px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 9px;
}

.inbox-search-box input:focus {
    border-color: #bf2532;
}


/* Toolbar */

.inbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #eeeeee;
}

.inbox-toolbar-left,
.inbox-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inbox-primary-btn,
.inbox-toolbar-btn {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 11px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 7px;
}

.inbox-primary-btn {
    color: #ffffff;
    background: #bf2532;
    border: 1px solid #bf2532;
}

.inbox-primary-btn:hover {
    background: #a91e2b;
}

.inbox-toolbar-btn {
    color: #555b64;
    background: #ffffff;
    border: 1px solid #dedede;
}

.inbox-toolbar-btn:hover,
.inbox-toolbar-btn.active {
    color: #bf2532;
    background: #fff7f8;
    border-color: #f0c9cd;
}

.inbox-toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.inbox-primary-btn svg,
.inbox-toolbar-btn svg {
    width: 14px;
    height: 14px;
}

.inbox-status-filter {
    height: 34px;
    min-width: 125px;
    padding: 0 30px 0 10px;
    color: #555b64;
    font-size: 10px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.inbox-status-filter:focus {
    border-color: #bf2532;
}


/* Summary */

.inbox-summary {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 10px 16px;
    border-bottom: 1px solid #eeeeee;
}

.inbox-summary-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.inbox-summary-item strong {
    color: #6558c8;
    font-size: 18px;
}

.inbox-summary-item span {
    color: #777d85;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.inbox-summary-item.unread strong {
    color: #279dc5;
}

.inbox-summary-item.alert strong,
.inbox-summary-item.expired strong {
    color: #bf2532;
}


/* Tabs */

.inbox-tabs {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 9px 16px;
    overflow-x: auto;
    border-bottom: 1px solid #eeeeee;
}

.inbox-tab {
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 0 10px;
    color: #62676f;
    font-size: 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
}

.inbox-tab svg {
    width: 13px;
    height: 13px;
}

.inbox-tab strong {
    min-width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    font-size: 8px;
    background: #f1f2f4;
    border-radius: 20px;
}

.inbox-tab:hover,
.inbox-tab.active {
    color: #bf2532;
    background: #fff4f5;
}

.inbox-tab.active {
    border-color: #f5d6d9;
}


/* Layout */

.inbox-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    min-height: 450px;
}

.inbox-list-area {
    min-width: 0;
    border-right: 1px solid #eeeeee;
}

.inbox-table-wrapper {
    width: 100%;
    overflow-x: auto;
}


/* Table */

.inbox-table {
    width: 100%;
    border-collapse: collapse;
}

.inbox-table th {
    height: 36px;
    padding: 0 12px;
    color: #727780;
    font-size: 9px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
}

.inbox-table td {
    height: 58px;
    padding: 8px 12px;
    color: #555b64;
    font-size: 10px;
    vertical-align: middle;
    border-bottom: 1px solid #eeeeee;
}

.inbox-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.inbox-table tbody tr:hover {
    background: #fafafa;
}

.inbox-table tbody tr.selected {
    background: #fff6f7;
}

.inbox-table tbody tr.unread {
    background: #fbfdff;
}

.inbox-table tbody tr.unread strong {
    font-weight: 700;
}

.inbox-check-column {
    width: 42px;
}

.inbox-table input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #bf2532;
}


/* Message */

.inbox-message-cell {
    min-width: 230px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.inbox-message-cell > div {
    min-width: 0;
}

.inbox-message-cell strong {
    display: block;
    margin-bottom: 3px;
    overflow: hidden;
    color: #252525;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-message-cell > div span {
    display: block;
    overflow: hidden;
    color: #8a9099;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Message Icons */

.inbox-message-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.inbox-message-icon svg {
    width: 14px;
    height: 14px;
}

.inbox-message-icon.reminder {
    color: #6558c8;
    background: #f0eeff;
}

.inbox-message-icon.alert {
    color: #b77900;
    background: #fff4d6;
}

.inbox-message-icon.expired {
    color: #bf2532;
    background: #fcebed;
}

.inbox-message-icon.system {
    color: #1686a7;
    background: #e8f7fc;
}


/* Type */

.inbox-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 21px;
    padding: 0 8px;
    font-size: 8px;
    font-weight: 700;
    border-radius: 20px;
}

.inbox-type.reminder {
    color: #6558c8;
    background: #f0eeff;
}

.inbox-type.alert {
    color: #b77900;
    background: #fff4d6;
}

.inbox-type.expired {
    color: #bf2532;
    background: #fcebed;
}

.inbox-type.system {
    color: #1686a7;
    background: #e8f7fc;
}


/* Delivery Status */

.inbox-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    height: 21px;
    padding: 0 8px;
    font-size: 8px;
    font-weight: 700;
    border-radius: 20px;
}

.inbox-status.sent {
    color: #1686a7;
    background: #e8f7fc;
}

.inbox-status.delivered {
    color: #198754;
    background: #e9f6ef;
}

.inbox-status.failed {
    color: #bf2532;
    background: #fcebed;
}

.inbox-status.pending {
    color: #b77900;
    background: #fff4d6;
}


/* Details */

.inbox-details {
    min-width: 0;
    background: #ffffff;
}

.inbox-details-empty {
    height: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
    text-align: center;
}

.inbox-details-empty-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #8a9099;
    background: #f5f6f7;
    border-radius: 11px;
}

.inbox-details-empty-icon svg {
    width: 20px;
    height: 20px;
}

.inbox-details-empty h3 {
    margin: 0 0 5px;
    color: #252525;
    font-size: 13px;
}

.inbox-details-empty p {
    max-width: 200px;
    margin: 0;
    color: #8a9099;
    font-size: 10px;
    line-height: 1.5;
}

.inbox-details-content {
    display: none;
}

.inbox-details-content.active {
    display: block;
}

.inbox-details-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 18px;
    border-bottom: 1px solid #eeeeee;
}

.inbox-details-header h3 {
    margin: 7px 0 0;
    color: #252525;
    font-size: 14px;
    line-height: 1.4;
}

.inbox-detail-type {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    color: #6558c8;
    font-size: 8px;
    font-weight: 700;
    background: #f0eeff;
    border-radius: 20px;
}

.inbox-details-close {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 7px;
}

.inbox-details-close svg {
    width: 14px;
    height: 14px;
}

.inbox-detail-section {
    padding: 9px 18px;
    border-bottom: 1px solid #eeeeee;
}

.inbox-detail-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
}

.inbox-detail-row span {
    color: #8a9099;
    font-size: 9px;
}

.inbox-detail-row strong {
    color: #383b40;
    font-size: 9px;
    font-weight: 600;
}

.inbox-detail-message {
    padding: 18px;
}

.inbox-detail-message > span {
    display: block;
    margin-bottom: 7px;
    color: #8a9099;
    font-size: 9px;
    font-weight: 600;
}

.inbox-detail-message p {
    margin: 0;
    color: #555b64;
    font-size: 10px;
    line-height: 1.7;
}


/* Pagination */

.inbox-pagination {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 14px;
    color: #8a9099;
    font-size: 9px;
}

.inbox-pagination-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inbox-pagination-actions select {
    height: 30px;
    padding: 0 24px 0 8px;
    color: #555b64;
    font-size: 9px;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 6px;
}

.inbox-pagination-actions button {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 6px;
}

.inbox-pagination-actions button svg {
    width: 12px;
    height: 12px;
}

.inbox-pagination-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* Empty */

.inbox-empty-state {
    display: none;
    min-height: 290px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #8a9099;
    text-align: center;
}

.inbox-empty-state.active {
    display: flex;
}

.inbox-empty-state svg {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
}

.inbox-empty-state strong {
    margin-bottom: 4px;
    color: #555b64;
    font-size: 11px;
}

.inbox-empty-state span {
    font-size: 9px;
}


/* Details Hidden */

.inbox-content.details-hidden {
    grid-template-columns: minmax(0, 1fr);
}

.inbox-content.details-hidden .inbox-details {
    display: none;
}


/* Responsive */

@media (max-width: 1100px) {

    .inbox-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .inbox-details {
        display: none;
    }

}

@media (max-width: 800px) {

    .inbox-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .inbox-toolbar-left,
    .inbox-toolbar-right {
        flex-wrap: wrap;
    }

    .inbox-summary {
        flex-wrap: wrap;
    }

}

/* =========================================================
   EXPLORER
   ========================================================= */

.explorer-page {
    width: 100%;
}


/* Header */

.explorer-add-btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    background: #bf2532;
    border: 1px solid #bf2532;
    border-radius: 8px;
}

.explorer-add-btn:hover {
    background: #a91e2b;
}

.explorer-add-btn svg {
    width: 15px;
    height: 15px;
}


/* Folders */

.explorer-folders {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.explorer-folder-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.explorer-folder-card:hover,
.explorer-folder-card.active {
    border-color: #efc8cc;
    box-shadow: 0 4px 14px rgba(20, 28, 40, 0.05);
}

.explorer-folder-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.explorer-folder-icon svg {
    width: 16px;
    height: 16px;
}

.explorer-folder-icon.employee {
    color: #6558c8;
    background: #f0eeff;
}

.explorer-folder-icon.company {
    color: #1686a7;
    background: #e8f7fc;
}

.explorer-folder-icon.asset {
    color: #198754;
    background: #e9f6ef;
}

.explorer-folder-icon.contract {
    color: #b77900;
    background: #fff4d6;
}

.explorer-folder-card > div {
    min-width: 0;
}

.explorer-folder-card strong {
    display: block;
    margin-bottom: 3px;
    overflow: hidden;
    color: #252525;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-folder-card span {
    color: #8a9099;
    font-size: 9px;
}


/* Main Panel */

.explorer-panel {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}


/* Toolbar */

.explorer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #eeeeee;
}

.explorer-toolbar-left,
.explorer-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.explorer-toolbar-left {
    min-width: 0;
    flex: 1;
}

.explorer-search {
    position: relative;
    width: 280px;
    max-width: 100%;
}

.explorer-search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 14px;
    height: 14px;
    color: #8a9099;
    transform: translateY(-50%);
}

.explorer-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    color: #252525;
    font-size: 10px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.explorer-toolbar select {
    height: 36px;
    min-width: 120px;
    padding: 0 28px 0 10px;
    color: #555b64;
    font-size: 10px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.explorer-search input:focus,
.explorer-toolbar select:focus {
    border-color: #bf2532;
}

.explorer-filter-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;

    color: #ffffff;
    font-size: 10px;
    font-weight: 600;

    background: #bf2532;
    border: 1px solid #bf2532;
    border-radius: 7px;
}

.explorer-filter-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.explorer-filter-btn:hover {
    background: #a91e2b;
    border-color: #a91e2b;
}

.explorer-filter-btn:hover {
    color: #bf2532;
    background: #fff7f8;
    border-color: #efc8cc;
}

.explorer-view-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.explorer-view-btn svg {
    width: 15px;
    height: 15px;
}

.explorer-view-btn:hover,
.explorer-view-btn.active {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}


/* Content */

.explorer-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 475px;
}

.explorer-content.details-open {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.explorer-main {
    min-width: 0;
    border-right: 1px solid #eeeeee;
}


/* Table */

.explorer-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.explorer-table {
    width: 100%;
    border-collapse: collapse;
}

.explorer-table th {
    height: 38px;
    padding: 0 12px;
    color: #727780;
    font-size: 8px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
}

.explorer-table td {
    height: 58px;
    padding: 8px 12px;
    color: #555b64;
    font-size: 9px;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid #eeeeee;
}

.explorer-item-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.explorer-item-row:hover {
    background: #fafafa;
}

.explorer-item-row.selected {
    background: #fff6f7;
}


/* Item Name */

.explorer-item-name {
    min-width: 210px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.explorer-item-name > div {
    min-width: 0;
}

.explorer-item-name strong {
    display: block;
    margin-bottom: 3px;
    overflow: hidden;
    color: #252525;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-item-name > div span {
    display: block;
    color: #8a9099;
    font-size: 8px;
}

.explorer-item-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.explorer-item-icon svg {
    width: 14px;
    height: 14px;
}

.explorer-item-icon.document {
    color: #6558c8;
    background: #f0eeff;
}

.explorer-item-icon.expired {
    color: #bf2532;
    background: #fcebed;
}

.explorer-item-icon.company {
    color: #1686a7;
    background: #e8f7fc;
}

.explorer-item-icon.insurance {
    color: #198754;
    background: #e9f6ef;
}

.explorer-item-icon.warranty {
    color: #b77900;
    background: #fff4d6;
}

.explorer-item-icon.contract {
    color: #6558c8;
    background: #f0eeff;
}


/* Status */

.explorer-status,
.explorer-days {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 21px;
    padding: 0 8px;
    font-size: 8px;
    font-weight: 700;
    border-radius: 20px;
}

.explorer-status.valid {
    color: #198754;
    background: #e9f6ef;
}

.explorer-status.expiring {
    color: #b77900;
    background: #fff4d6;
}

.explorer-status.expired {
    color: #bf2532;
    background: #fcebed;
}

.explorer-status.pending {
    color: #6558c8;
    background: #f0eeff;
}

.explorer-days.safe {
    color: #198754;
    background: #e9f6ef;
}

.explorer-days.warning {
    color: #b77900;
    background: #fff4d6;
}

.explorer-days.danger {
    color: #bf2532;
    background: #fcebed;
}

.explorer-days.pending {
    color: #6558c8;
    background: #f0eeff;
}


/* List / Tile */

.explorer-list-view {
    display: none;
}

.explorer-list-view.active {
    display: block;
}

.explorer-tile-view {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}

.explorer-tile-view.active {
    display: grid;
}

.explorer-tile-card {
    min-width: 0;
    padding: 14px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.explorer-tile-card:hover,
.explorer-tile-card.selected {
    border-color: #efc8cc;
    box-shadow: 0 4px 14px rgba(20, 28, 40, 0.05);
}

.explorer-tile-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.explorer-tile-card h3 {
    margin: 0 0 4px;
    overflow: hidden;
    color: #252525;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-tile-card p {
    margin: 0;
    color: #8a9099;
    font-size: 8px;
}

.explorer-tile-meta {
    display: grid;
    gap: 8px;
}

.explorer-tile-meta div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.explorer-tile-meta span {
    color: #8a9099;
    font-size: 8px;
}

.explorer-tile-meta strong {
    overflow: hidden;
    color: #555b64;
    font-size: 8px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Empty */

.explorer-empty-state {
    display: none;
    min-height: 320px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #8a9099;
    text-align: center;
}

.explorer-empty-state.active {
    display: flex;
}

.explorer-empty-state svg {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
}

.explorer-empty-state strong {
    margin-bottom: 4px;
    color: #555b64;
    font-size: 11px;
}

.explorer-empty-state span {
    font-size: 9px;
}


/* Footer */

.explorer-footer {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    color: #8a9099;
    font-size: 9px;
}


/* Details */

.explorer-details {
    display: none;
    min-width: 0;
    background: #ffffff;
}

.explorer-content.details-open .explorer-details {
    display: block;
}

.explorer-details-empty {
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 25px;
    text-align: center;
}

.explorer-details-empty-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 11px;
    color: #8a9099;
    background: #f5f6f7;
    border-radius: 11px;
}

.explorer-details-empty-icon svg {
    width: 20px;
    height: 20px;
}

.explorer-details-empty h3 {
    margin: 0 0 5px;
    color: #252525;
    font-size: 13px;
}

.explorer-details-empty p {
    max-width: 200px;
    margin: 0;
    color: #8a9099;
    font-size: 9px;
    line-height: 1.6;
}

.explorer-details-content {
    display: none;
}

.explorer-details-content.active {
    display: block;
}

.explorer-details-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 17px;
    border-bottom: 1px solid #eeeeee;
}

.explorer-details-header h3 {
    margin: 7px 0 0;
    color: #252525;
    font-size: 14px;
    line-height: 1.4;
}

.explorer-detail-status {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    color: #198754;
    font-size: 8px;
    font-weight: 700;
    background: #e9f6ef;
    border-radius: 20px;
}

.explorer-detail-status.valid {
    color: #198754;
    background: #e9f6ef;
}

.explorer-detail-status.expiring {
    color: #b77900;
    background: #fff4d6;
}

.explorer-detail-status.expired {
    color: #bf2532;
    background: #fcebed;
}

.explorer-detail-status.pending {
    color: #6558c8;
    background: #f0eeff;
}

.explorer-details-close {
    width: 29px;
    height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.explorer-details-close svg {
    width: 13px;
    height: 13px;
}

.explorer-detail-section {
    padding: 8px 17px;
    border-bottom: 1px solid #eeeeee;
}

.explorer-detail-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
}

.explorer-detail-row span {
    color: #8a9099;
    font-size: 9px;
}

.explorer-detail-row strong {
    color: #383b40;
    font-size: 9px;
    font-weight: 600;
}

.explorer-detail-note {
    padding: 17px;
}

.explorer-detail-note > span {
    display: block;
    margin-bottom: 7px;
    color: #8a9099;
    font-size: 9px;
    font-weight: 600;
}

.explorer-detail-note p {
    margin: 0;
    color: #555b64;
    font-size: 9px;
    line-height: 1.7;
}


/* Modal */

.explorer-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(28, 31, 36, 0.48);
}

.explorer-modal-overlay.active {
    display: flex;
}

.explorer-modal-card {
    width: min(640px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(20, 28, 40, 0.18);
}

.explorer-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.explorer-modal-header h2 {
    margin: 0 0 4px;
    color: #252525;
    font-size: 15px;
}

.explorer-modal-header p {
    margin: 0;
    color: #8a9099;
    font-size: 9px;
}

.explorer-modal-close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.explorer-modal-close svg {
    width: 14px;
    height: 14px;
}

.explorer-modal-body {
    padding: 18px 20px;
}

.explorer-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.explorer-form-group {
    margin-bottom: 12px;
}

.explorer-form-group.full {
    width: 100%;
}

.explorer-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
}

.explorer-form-group input,
.explorer-form-group select,
.explorer-form-group textarea {
    width: 100%;
    color: #252525;
    font-size: 10px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.explorer-form-group input,
.explorer-form-group select {
    height: 38px;
    padding: 0 10px;
}

.explorer-form-group textarea {
    padding: 10px;
    resize: vertical;
}

.explorer-form-group input:focus,
.explorer-form-group select:focus,
.explorer-form-group textarea:focus {
    border-color: #bf2532;
}

.explorer-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
}

.explorer-cancel-btn,
.explorer-save-btn {
    height: 36px;
    padding: 0 13px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
}

.explorer-cancel-btn {
    color: #555b64;
    background: #ffffff;
    border: 1px solid #dedede;
}

.explorer-save-btn {
    color: #ffffff;
    background: #bf2532;
    border: 1px solid #bf2532;
}


/* Responsive */

@media (max-width: 1100px) {

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

    .explorer-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .explorer-details {
        display: none;
    }

}

@media (max-width: 800px) {

    .explorer-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .explorer-toolbar-left {
        width: 100%;
        flex-wrap: wrap;
    }

    .explorer-search {
        width: 100%;
    }

    .explorer-toolbar-right {
        width: 100%;
        justify-content: flex-end;
    }

    .explorer-tile-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .explorer-folders,
    .explorer-tile-view,
    .explorer-form-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   DRIVE
   ========================================================= */

.drive-page {
    width: 100%;
}


/* Header */

.drive-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drive-primary-btn,
.drive-secondary-btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
}

.drive-primary-btn {
    color: #ffffff;
    background: #bf2532;
    border: 1px solid #bf2532;
}

.drive-primary-btn:hover {
    background: #a91e2b;
}

.drive-secondary-btn {
    color: #555b64;
    background: #ffffff;
    border: 1px solid #dedede;
}

.drive-secondary-btn:hover {
    color: #bf2532;
    border-color: #efc8cc;
    background: #fff7f8;
}

.drive-primary-btn svg,
.drive-secondary-btn svg {
    width: 14px;
    height: 14px;
}


/* Folders */

.drive-folders {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.drive-folder-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    text-align: left;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
}

.drive-folder-card:hover,
.drive-folder-card.active {
    border-color: #efc8cc;
    box-shadow: 0 4px 14px rgba(20, 28, 40, 0.05);
}

.drive-folder-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.drive-folder-icon svg {
    width: 16px;
    height: 16px;
}

.drive-folder-icon.all {
    color: #b77900;
    background: #fff4d6;
}

.drive-folder-icon.employee {
    color: #6558c8;
    background: #f0eeff;
}

.drive-folder-icon.company {
    color: #1686a7;
    background: #e8f7fc;
}

.drive-folder-icon.insurance {
    color: #198754;
    background: #e9f6ef;
}

.drive-folder-card strong {
    display: block;
    margin-bottom: 3px;
    color: #252525;
    font-size: 10px;
}

.drive-folder-card span {
    color: #8a9099;
    font-size: 9px;
}


/* Panel */

.drive-panel {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}


/* Toolbar */

.drive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #eeeeee;
}

.drive-toolbar-left,
.drive-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drive-toolbar-left {
    min-width: 0;
    flex: 1;
}

.drive-search {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.drive-search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 14px;
    height: 14px;
    color: #8a9099;
    transform: translateY(-50%);
}

.drive-search input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    color: #252525;
    font-size: 10px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.drive-toolbar select {
    height: 36px;
    min-width: 120px;
    padding: 0 28px 0 10px;
    color: #555b64;
    font-size: 10px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.drive-search input:focus,
.drive-toolbar select:focus {
    border-color: #bf2532;
}

.drive-filter-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    background: #bf2532;
    border: 1px solid #bf2532;
    border-radius: 7px;
}

.drive-filter-btn svg {
    width: 14px;
    height: 14px;
}

.drive-filter-btn:hover {
    background: #a91e2b;
}

.drive-view-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.drive-view-btn svg {
    width: 15px;
    height: 15px;
}

.drive-view-btn:hover,
.drive-view-btn.active {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}


/* Content */

.drive-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 470px;
}

.drive-content.details-open {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.drive-main {
    min-width: 0;
}

.drive-content.details-open .drive-main {
    border-right: 1px solid #eeeeee;
}


/* Table */

.drive-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.drive-table {
    width: 100%;
    border-collapse: collapse;
}

.drive-table th {
    height: 38px;
    padding: 0 12px;
    color: #727780;
    font-size: 8px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
}

.drive-table td {
    height: 58px;
    padding: 8px 12px;
    color: #555b64;
    font-size: 9px;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid #eeeeee;
}

.drive-item-row {
    cursor: pointer;
}

.drive-item-row:hover {
    background: #fafafa;
}

.drive-item-row.selected {
    background: #fff6f7;
}


/* Name */

.drive-name-cell {
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drive-name-cell > div {
    min-width: 0;
}

.drive-name-cell strong {
    display: block;
    margin-bottom: 3px;
    overflow: hidden;
    color: #252525;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drive-name-cell > div span {
    display: block;
    color: #8a9099;
    font-size: 8px;
}

.drive-file-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.drive-file-icon svg {
    width: 14px;
    height: 14px;
}

.drive-file-icon.folder {
    color: #b77900;
    background: #fff4d6;
}

.drive-file-icon.pdf {
    color: #bf2532;
    background: #fcebed;
}

.drive-file-icon.image {
    color: #6558c8;
    background: #f0eeff;
}

.drive-file-icon.document {
    color: #1686a7;
    background: #e8f7fc;
}


/* Action */

.drive-action-btn {
    width: 29px;
    height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.drive-action-btn svg {
    width: 13px;
    height: 13px;
}

.drive-action-btn:hover {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}


/* List / Tile */

.drive-list-view {
    display: none;
}

.drive-list-view.active {
    display: block;
}

.drive-tile-view {
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}

.drive-tile-view.active {
    display: grid;
}

.drive-tile-card {
    min-width: 0;
    padding: 14px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.drive-tile-card:hover,
.drive-tile-card.selected {
    border-color: #efc8cc;
    box-shadow: 0 4px 14px rgba(20, 28, 40, 0.05);
}

.drive-tile-card-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 9px;
}

.drive-tile-card-icon svg {
    width: 17px;
    height: 17px;
}

.drive-tile-card-icon.folder {
    color: #b77900;
    background: #fff4d6;
}

.drive-tile-card-icon.pdf {
    color: #bf2532;
    background: #fcebed;
}

.drive-tile-card-icon.image {
    color: #6558c8;
    background: #f0eeff;
}

.drive-tile-card h3 {
    margin: 0 0 4px;
    overflow: hidden;
    color: #252525;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drive-tile-card p {
    margin: 0;
    color: #8a9099;
    font-size: 8px;
}

.drive-tile-meta {
    display: grid;
    gap: 7px;
    margin-top: 12px;
}

.drive-tile-meta div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.drive-tile-meta span,
.drive-tile-meta strong {
    font-size: 8px;
}

.drive-tile-meta span {
    color: #8a9099;
}

.drive-tile-meta strong {
    overflow: hidden;
    color: #555b64;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Empty */

.drive-empty-state {
    display: none;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #8a9099;
    text-align: center;
}

.drive-empty-state.active {
    display: flex;
}

.drive-empty-state svg {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
}

.drive-empty-state strong {
    margin-bottom: 4px;
    color: #555b64;
    font-size: 11px;
}

.drive-empty-state span {
    font-size: 9px;
}


/* Footer */

.drive-footer {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    color: #8a9099;
    font-size: 9px;
}


/* Details */

.drive-details {
    display: none;
    min-width: 0;
    background: #ffffff;
}

.drive-content.details-open .drive-details {
    display: block;
}

.drive-details-empty {
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 25px;
    text-align: center;
}

.drive-details-empty-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 11px;
    color: #8a9099;
    background: #f5f6f7;
    border-radius: 11px;
}

.drive-details-empty-icon svg {
    width: 20px;
    height: 20px;
}

.drive-details-empty h3 {
    margin: 0 0 5px;
    color: #252525;
    font-size: 13px;
}

.drive-details-empty p {
    max-width: 200px;
    margin: 0;
    color: #8a9099;
    font-size: 9px;
    line-height: 1.6;
}

.drive-details-content {
    display: none;
}

.drive-details-content.active {
    display: block;
}

.drive-details-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 17px;
    border-bottom: 1px solid #eeeeee;
}

.drive-details-header h3 {
    margin: 7px 0 0;
    color: #252525;
    font-size: 14px;
    line-height: 1.4;
}

.drive-detail-type {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    color: #6558c8;
    font-size: 8px;
    font-weight: 700;
    background: #f0eeff;
    border-radius: 20px;
}

.drive-details-close {
    width: 29px;
    height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.drive-details-close svg {
    width: 13px;
    height: 13px;
}

.drive-detail-section {
    padding: 8px 17px;
    border-bottom: 1px solid #eeeeee;
}

.drive-detail-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
}

.drive-detail-row span {
    color: #8a9099;
    font-size: 9px;
}

.drive-detail-row strong {
    color: #383b40;
    font-size: 9px;
    font-weight: 600;
}

.drive-detail-actions {
    display: grid;
    gap: 8px;
    padding: 17px;
}

.drive-detail-actions button {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 11px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.drive-detail-actions button svg {
    width: 13px;
    height: 13px;
}

.drive-detail-actions button:hover {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}

.drive-detail-actions button.danger {
    color: #bf2532;
}


/* Modal */

.drive-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(28, 31, 36, 0.48);
}

.drive-modal-overlay.active {
    display: flex;
}

.drive-modal-card {
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(20, 28, 40, 0.18);
}

.drive-folder-modal-card {
    width: min(440px, 100%);
}

.drive-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.drive-modal-header h2 {
    margin: 0 0 4px;
    color: #252525;
    font-size: 15px;
}

.drive-modal-header p {
    margin: 0;
    color: #8a9099;
    font-size: 9px;
}

.drive-modal-close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.drive-modal-close svg {
    width: 14px;
    height: 14px;
}

.drive-modal-body {
    padding: 18px 20px;
}

.drive-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.drive-form-group {
    margin-bottom: 12px;
}

.drive-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
}

.drive-form-group input,
.drive-form-group select,
.drive-form-group textarea {
    width: 100%;
    color: #252525;
    font-size: 10px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.drive-form-group input,
.drive-form-group select {
    height: 38px;
    padding: 0 10px;
}

.drive-form-group input[type="file"] {
    height: auto;
    padding: 10px;
}

.drive-form-group textarea {
    padding: 10px;
    resize: vertical;
}

.drive-form-group input:focus,
.drive-form-group select:focus,
.drive-form-group textarea:focus {
    border-color: #bf2532;
}

.drive-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
}

.drive-cancel-btn,
.drive-save-btn {
    height: 36px;
    padding: 0 13px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
}

.drive-cancel-btn {
    color: #555b64;
    background: #ffffff;
    border: 1px solid #dedede;
}

.drive-save-btn {
    color: #ffffff;
    background: #bf2532;
    border: 1px solid #bf2532;
}


/* Responsive */

@media (max-width: 1100px) {

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

    .drive-content.details-open {
        grid-template-columns: minmax(0, 1fr);
    }

    .drive-details {
        display: none !important;
    }

}

@media (max-width: 800px) {

    .drive-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .drive-toolbar-left {
        width: 100%;
        flex-wrap: wrap;
    }

    .drive-search {
        width: 100%;
    }

    .drive-toolbar-right {
        width: 100%;
        justify-content: flex-end;
    }

    .drive-tile-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .drive-folders,
    .drive-tile-view,
    .drive-form-grid {
        grid-template-columns: 1fr;
    }

    .drive-header-actions {
        flex-wrap: wrap;
    }

}

/* =========================================================
   CALENDAR EVENT MODAL
   ========================================================= */

.calendar-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(28, 31, 36, 0.48);
}

.calendar-modal-overlay.active {
    display: flex;
}

.calendar-modal-card {
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(20, 28, 40, 0.18);
}

.calendar-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.calendar-modal-header h2 {
    margin: 0 0 4px;
    color: #252525;
    font-size: 15px;
}

.calendar-modal-header p {
    margin: 0;
    color: #8a9099;
    font-size: 9px;
}

.calendar-modal-close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.calendar-modal-close svg {
    width: 14px;
    height: 14px;
}

.calendar-modal-body {
    padding: 18px 20px;
}

.calendar-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.calendar-form-group {
    margin-bottom: 12px;
}

.calendar-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
}

.calendar-form-group input,
.calendar-form-group select,
.calendar-form-group textarea {
    width: 100%;
    color: #252525;
    font-size: 10px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.calendar-form-group input,
.calendar-form-group select {
    height: 38px;
    padding: 0 10px;
}

.calendar-form-group textarea {
    padding: 10px;
    resize: vertical;
}

.calendar-form-group input:focus,
.calendar-form-group select:focus,
.calendar-form-group textarea:focus {
    border-color: #bf2532;
}

.calendar-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
}

.calendar-modal-cancel,
.calendar-modal-save {
    height: 36px;
    padding: 0 13px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
}

.calendar-modal-cancel {
    color: #555b64;
    background: #ffffff;
    border: 1px solid #dedede;
}

.calendar-modal-save {
    color: #ffffff;
    background: #bf2532;
    border: 1px solid #bf2532;
}

@media (max-width: 650px) {

    .calendar-form-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   CALENDAR EVENT POPOVER
   ========================================================= */

.calendar-event-popover {
    position: fixed;
    z-index: 30000;
    width: 250px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(20, 28, 40, 0.16);
}

.calendar-event-popover-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px 11px;
    border-bottom: 1px solid #eeeeee;
}

.calendar-event-popover-header > div {
    min-width: 0;
}

.calendar-event-popover-header h4 {
    margin: 6px 0 0;
    overflow: hidden;
    color: #252525;
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-popover-type {
    display: inline-flex;
    align-items: center;
    min-height: 19px;
    padding: 0 7px;
    font-size: 7px;
    font-weight: 700;
    border-radius: 20px;
}

.calendar-event-popover-type.expiration {
    color: #bf2532;
    background: #fcebed;
}

.calendar-event-popover-type.due {
    color: #b77900;
    background: #fff4d6;
}

.calendar-event-popover-type.appointment {
    color: #6558c8;
    background: #f0eeff;
}

.calendar-event-popover-type.event {
    color: #1686a7;
    background: #e8f7fc;
}

.calendar-event-popover-type.birthday {
    color: #198754;
    background: #e9f6ef;
}

.calendar-event-popover-close {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    cursor: pointer;
}

.calendar-event-popover-close:hover {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}

.calendar-event-popover-close svg {
    width: 12px;
    height: 12px;
}

.calendar-event-popover-body {
    padding: 7px 14px 11px;
}

.calendar-event-popover-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
}

.calendar-event-popover-row > svg {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    color: #8a9099;
}

.calendar-event-popover-row > div {
    min-width: 0;
}

.calendar-event-popover-row span {
    display: block;
    margin-bottom: 2px;
    color: #8a9099;
    font-size: 8px;
}

.calendar-event-popover-row strong {
    display: block;
    overflow: hidden;
    color: #383b40;
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 600px) {

    .calendar-event-popover {
        width: min(250px, calc(100vw - 24px));
    }

}

/* =========================================================
   CALENDAR VIEWS
   ========================================================= */

.calendar-view {
    display: none;
}

.calendar-view.active {
    display: block;
}


/* Week View */

.calendar-week-view-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-height: 520px;
}

.calendar-week-column {
    min-width: 0;
    border-right: 1px solid #e8e8e8;
    background: #ffffff;
}

.calendar-week-column:last-child {
    border-right: 0;
}

.calendar-week-column.today {
    background: #fff8f8;
}

.calendar-week-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 52px;
    padding: 10px;
    border-bottom: 1px solid #e8e8e8;
}

.calendar-week-column-header span {
    color: #8a9099;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.calendar-week-column-header strong {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #252525;
    font-size: 10px;
    border-radius: 50%;
}

.calendar-week-column.today .calendar-week-column-header strong {
    color: #ffffff;
    background: #bf2532;
}

.calendar-week-events {
    display: grid;
    gap: 6px;
    padding: 9px;
}

.calendar-week-events .calendar-event {
    width: 100%;
}

.calendar-view-empty-small {
    padding: 16px 6px;
    color: #a0a5ac;
    font-size: 8px;
    text-align: center;
}


/* Day View */

.calendar-day-view-content {
    min-height: 520px;
    padding: 18px;
    background: #ffffff;
}

.calendar-day-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #eeeeee;
}

.calendar-day-view-header span {
    color: #8a9099;
    font-size: 9px;
    font-weight: 600;
}

.calendar-day-view-header strong {
    color: #252525;
    font-size: 14px;
}

.calendar-day-event-list {
    display: grid;
    gap: 10px;
}


/* Agenda View */

.calendar-agenda-list {
    min-height: 520px;
    padding: 12px 14px;
    background: #ffffff;
}

.calendar-agenda-item {
    display: grid;
    grid-template-columns: 54px 34px minmax(0, 1fr) 90px;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 10px 6px;
    cursor: pointer;
    border-bottom: 1px solid #eeeeee;
}

.calendar-agenda-item:hover {
    background: #fafafa;
}

.calendar-agenda-date {
    text-align: center;
}

.calendar-agenda-date strong {
    display: block;
    color: #252525;
    font-size: 15px;
    line-height: 1;
}

.calendar-agenda-date span {
    display: block;
    margin-top: 4px;
    color: #8a9099;
    font-size: 7px;
    font-weight: 700;
}

.calendar-agenda-type {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.calendar-agenda-type svg {
    width: 13px;
    height: 13px;
}

.calendar-agenda-type.expiration {
    color: #bf2532;
    background: #fcebed;
}

.calendar-agenda-type.due {
    color: #b77900;
    background: #fff4d6;
}

.calendar-agenda-type.appointment {
    color: #6558c8;
    background: #f0eeff;
}

.calendar-agenda-type.event {
    color: #1686a7;
    background: #e8f7fc;
}

.calendar-agenda-type.birthday {
    color: #198754;
    background: #e9f6ef;
}

.calendar-agenda-info {
    min-width: 0;
}

.calendar-agenda-info strong {
    display: block;
    margin-bottom: 3px;
    overflow: hidden;
    color: #252525;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-agenda-info span {
    display: block;
    overflow: hidden;
    color: #8a9099;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-agenda-time {
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
    text-align: right;
}


/* Shared Empty State */

.calendar-view-empty {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: #8a9099;
}

.calendar-view-empty svg {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
}

.calendar-view-empty strong {
    margin-bottom: 4px;
    color: #555b64;
    font-size: 11px;
}

.calendar-view-empty span {
    max-width: 260px;
    font-size: 9px;
    line-height: 1.5;
}


/* Upcoming dynamic content */

.calendar-upcoming-list {
    display: grid;
}

.calendar-upcoming-empty {
    padding: 12px 0;
    color: #8a9099;
    font-size: 9px;
}


/* Responsive */

@media (max-width: 1000px) {

    .calendar-week-view-grid {
        overflow-x: auto;
        grid-template-columns: repeat(7, minmax(120px, 1fr));
    }

    .calendar-agenda-item {
        grid-template-columns: 48px 32px minmax(0, 1fr);
    }

    .calendar-agenda-time {
        display: none;
    }

}

@media (max-width: 650px) {

    .calendar-day-view-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .calendar-agenda-item {
        grid-template-columns: 42px 30px minmax(0, 1fr);
    }

}

/* Custom Event Type */

.calendar-custom-type-group {
    display: none;
}

.calendar-custom-type-group.active {
    display: block;
}


/* Notes */

.calendar-notes-group {
    margin-bottom: 0;
}

.calendar-notes-group textarea {
    min-height: 76px;
    resize: vertical;
}

/* =========================================================
   INSIGHTS
   ========================================================= */

.insights-page {
    width: 100%;
}


/* Filters */

.insights-filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 11px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
}

.insights-filter-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.insights-detail-reports-btn {
    height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.insights-detail-reports-btn:hover {
    color: #bf2532;
    border-color: #efc8cc;
    background: #fff7f8;
}

.insights-detail-reports-btn svg {
    width: 13px;
    height: 13px;
}

.insights-period-tabs {
    display: flex;
    align-items: center;
    gap: 3px;
}

.insights-period-tabs button {
    height: 32px;
    padding: 0 10px;
    color: #6f747c;
    font-size: 9px;
    font-weight: 600;
    background: transparent;
    border: 0;
    border-radius: 7px;
}

.insights-period-tabs button:hover,
.insights-period-tabs button.active {
    color: #bf2532;
    background: #fff2f3;
}

.insights-date-filter {
    display: flex;
    align-items: center;
    gap: 7px;
}

.insights-date-filter input {
    width: 132px;
    height: 34px;
    padding: 0 9px;
    color: #555b64;
    font-size: 9px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.insights-date-filter input:focus {
    border-color: #bf2532;
}

.insights-date-filter > span {
    color: #9a9fa6;
    font-size: 9px;
}

.insights-apply-btn {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 13px;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    background: #bf2532;
    border: 1px solid #bf2532;
    border-radius: 7px;
}

.insights-apply-btn:hover {
    background: #a91e2b;
}

.insights-apply-btn svg {
    width: 13px;
    height: 13px;
}


/* Summary Cards */

.insights-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.insights-summary-card {
    min-width: 0;
    padding: 13px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
}

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

.insights-summary-top > span:first-child {
    color: #676c74;
    font-size: 9px;
    font-weight: 600;
}

.insights-summary-icon {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
}

.insights-summary-icon svg {
    width: 13px;
    height: 13px;
}

.insights-summary-icon.blue {
    color: #1686a7;
    background: #e8f7fc;
}

.insights-summary-icon.green {
    color: #198754;
    background: #e9f6ef;
}

.insights-summary-icon.red {
    color: #bf2532;
    background: #fcebed;
}

.insights-summary-icon.orange {
    color: #b77900;
    background: #fff4d6;
}

.insights-summary-card > strong {
    display: block;
    margin-bottom: 7px;
    color: #222222;
    font-size: 20px;
    line-height: 1;
}

.insights-summary-card small {
    display: block;
    font-size: 7px;
    line-height: 1.4;
}

.insights-summary-card small.positive {
    color: #198754;
}

.insights-summary-card small.negative {
    color: #bf2532;
}

.insights-summary-card small.warning {
    color: #b77900;
}


/* Section Switch */

.insights-section-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 520px;
    max-width: 100%;
    margin-bottom: 14px;
}

.insights-section-card {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 13px;
    text-align: left;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.insights-section-card:hover,
.insights-section-card.active {
    border-color: #efc8cc;
    box-shadow: 0 4px 12px rgba(20, 28, 40, 0.05);
}

.insights-section-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bf2532;
    background: #fff0f2;
    border-radius: 8px;
}

.insights-section-icon svg {
    width: 15px;
    height: 15px;
}

.insights-section-card strong {
    display: block;
    margin-bottom: 3px;
    color: #252525;
    font-size: 10px;
}

.insights-section-card span {
    color: #8a9099;
    font-size: 8px;
}


/* Content */

.insights-content-section {
    display: none;
}

.insights-content-section.active {
    display: block;
}

.insights-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.insights-chart-card {
    min-width: 0;
    min-height: 300px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
}

.insights-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.insights-chart-header h3 {
    margin: 0 0 4px;
    color: #252525;
    font-size: 11px;
}

.insights-chart-header p {
    margin: 0;
    color: #8a9099;
    font-size: 8px;
}

.insights-chart-header > svg {
    width: 16px;
    height: 16px;
    color: #9ba0a7;
}


/* Status Bars */

.insights-bar-chart {
    display: grid;
    gap: 22px;
    padding: 12px 4px;
}

.insights-bar-row {
    display: grid;
    gap: 7px;
}

.insights-bar-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.insights-bar-label span {
    color: #676c74;
    font-size: 9px;
}

.insights-bar-label strong {
    color: #252525;
    font-size: 9px;
}

.insights-bar-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    background: #f1f2f4;
    border-radius: 20px;
}

.insights-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 20px;
    transition: width 0.4s ease;
}

.insights-bar-fill.sent {
    background: #198754;
}

.insights-bar-fill.failed {
    background: #bf2532;
}

.insights-bar-fill.pending {
    background: #b77900;
}


/* Donut */

.insights-donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    min-height: 220px;
}

.insights-donut {
    position: relative;
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    border-radius: 50%;
    background:
        conic-gradient(
            #1686a7 0 68%,
            #6558c8 68% 87%,
            #198754 87% 100%
        );
}

.insights-donut::after {
    content: "";
    position: absolute;
    inset: 28px;
    background: #ffffff;
    border-radius: 50%;
}

.insights-donut-center {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.insights-donut-center strong {
    color: #252525;
    font-size: 18px;
}

.insights-donut-center span {
    margin-top: 3px;
    color: #8a9099;
    font-size: 8px;
}

.insights-donut-legend {
    display: grid;
    gap: 12px;
    min-width: 130px;
}

.insights-donut-legend > div {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
}

.insights-donut-legend span,
.insights-donut-legend strong {
    font-size: 9px;
}

.insights-donut-legend span {
    color: #676c74;
}

.insights-donut-legend strong {
    color: #252525;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.email {
    background: #1686a7;
}

.legend-dot.sms {
    background: #6558c8;
}

.legend-dot.whatsapp {
    background: #198754;
}


/* Validity */

.insights-validity-list {
    display: grid;
    gap: 12px;
}

.insights-validity-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 9px;
}

.validity-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.validity-icon svg {
    width: 15px;
    height: 15px;
}

.validity-icon.valid {
    color: #198754;
    background: #e9f6ef;
}

.validity-icon.expiring {
    color: #b77900;
    background: #fff4d6;
}

.validity-icon.expired {
    color: #bf2532;
    background: #fcebed;
}

.insights-validity-item div span {
    display: block;
    margin-bottom: 3px;
    color: #8a9099;
    font-size: 8px;
}

.insights-validity-item div strong {
    color: #252525;
    font-size: 12px;
}

.insights-validity-item small {
    color: #676c74;
    font-size: 9px;
    font-weight: 600;
}


/* Horizontal Chart */

.insights-horizontal-chart {
    display: grid;
    gap: 14px;
}

.insights-horizontal-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 10px;
}

.insights-horizontal-row > span {
    overflow: hidden;
    color: #676c74;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insights-horizontal-row > div {
    height: 8px;
    overflow: hidden;
    background: #f1f2f4;
    border-radius: 20px;
}

.insights-horizontal-row > div i {
    display: block;
    height: 100%;
    background: #1686a7;
    border-radius: 20px;
}

.insights-horizontal-row > strong {
    color: #252525;
    font-size: 8px;
    text-align: right;
}

.width-82 {
    width: 82%;
}

.width-74 {
    width: 74%;
}

.width-62 {
    width: 62%;
}

.width-38 {
    width: 38%;
}

.width-33 {
    width: 33%;
}

.width-36 {
    width: 36%;
}


/* Responsive */

@media (max-width: 1150px) {

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

    .insights-filter-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .insights-date-filter {
        width: 100%;
    }

}

@media (max-width: 800px) {

    .insights-summary-grid,
    .insights-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .insights-filter-left {
        align-items: flex-start;
        flex-direction: column;
    }

    .insights-period-tabs {
        flex-wrap: wrap;
    }

    .insights-donut-wrap {
        flex-direction: column;
        gap: 20px;
    }

}

@media (max-width: 600px) {

    .insights-summary-grid,
    .insights-chart-grid,
    .insights-section-switch {
        grid-template-columns: 1fr;
    }

    .insights-date-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .insights-date-filter input {
        width: 100%;
    }

}

/* =========================================================
   INSIGHTS REPORT DETAILS
   ========================================================= */

.insight-report-details-overlay {
    position: fixed;
    inset: 0;
    z-index: 25000;
    visibility: hidden;
    background: rgba(28, 31, 36, 0.28);
    opacity: 0;
    transition: 0.2s ease;
}

.insight-report-details-overlay.active {
    visibility: visible;
    opacity: 1;
}

.insight-report-details {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 30px);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: -12px 0 30px rgba(20, 28, 40, 0.12);
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.insight-report-details.active {
    transform: translateX(0);
}


/* Header */

.insight-report-details-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid #eeeeee;
}

.insight-report-details-header > div {
    min-width: 0;
}

.insight-report-details-header h2 {
    margin: 7px 0 0;
    color: #252525;
    font-size: 15px;
    line-height: 1.4;
}

.insight-report-category {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    color: #bf2532;
    font-size: 8px;
    font-weight: 700;
    background: #fcebed;
    border-radius: 20px;
}

.insight-report-details-close {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
    cursor: pointer;
}

.insight-report-details-close:hover {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}

.insight-report-details-close svg {
    width: 14px;
    height: 14px;
}


/* Body */

.insight-report-details-body {
    flex: 1;
    overflow-y: auto;
    padding: 5px 20px 20px;
}

.insight-report-detail-section {
    padding: 17px 0;
    border-bottom: 1px solid #eeeeee;
}

.insight-report-detail-section:last-child {
    border-bottom: 0;
}

.insight-report-detail-label {
    display: block;
    margin-bottom: 8px;
    color: #8a9099;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.insight-report-detail-section p {
    margin: 0;
    color: #555b64;
    font-size: 10px;
    line-height: 1.7;
}


/* Columns */

.insight-report-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.insight-report-columns span {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 9px;
    color: #555b64;
    font-size: 8px;
    font-weight: 600;
    background: #f6f7f8;
    border: 1px solid #e7e8ea;
    border-radius: 6px;
}


/* Footer */

.insight-report-details-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
}

.insight-report-secondary-btn,
.insight-report-primary-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    font-size: 9px;
    font-weight: 600;
    border-radius: 7px;
    cursor: pointer;
}

.insight-report-secondary-btn {
    color: #555b64;
    background: #ffffff;
    border: 1px solid #dedede;
}

.insight-report-primary-btn {
    color: #ffffff;
    background: #bf2532;
    border: 1px solid #bf2532;
}

.insight-report-primary-btn:hover {
    background: #a91e2b;
}

.insight-report-primary-btn svg {
    width: 13px;
    height: 13px;
}

/* =========================================================
   INSIGHTS - DETAIL REPORTS PAGE
   ========================================================= */

.insights-reports-page {
    width: 100%;
}


/* Back Button */

.insights-back-btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.insights-back-btn:hover {
    color: #bf2532;
    border-color: #e8b8bd;
}

.insights-back-btn svg {
    width: 14px;
    height: 14px;
}


/* Main Panel */

.insights-reports-panel {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e4e7;
    border-radius: 14px;
}


/* Toolbar */

.insights-reports-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #eeeeee;
}

.insights-report-search {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.insights-report-search > svg {
    position: absolute;
    top: 50%;
    left: 11px;
    width: 14px;
    height: 14px;
    color: #8a9099;
    pointer-events: none;
    transform: translateY(-50%);
}

.insights-report-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 34px;
    color: #333333;
    font-size: 9px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.insights-report-search input:focus {
    border-color: #bf2532;
}

.insights-reports-toolbar select {
    width: 128px;
    height: 38px;
    padding: 0 10px;
    color: #555b64;
    font-size: 9px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.insights-report-filter-btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    color: #ffffff;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    background: #bf2532;
    border: 1px solid #bf2532;
    border-radius: 8px;
}

.insights-report-filter-btn:hover {
    background: #aa1f2c;
}

.insights-report-filter-btn svg {
    width: 13px;
    height: 13px;
}


/* Table */

.insights-reports-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.insights-reports-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.insights-reports-table thead {
    background: #fafbfc;
}

.insights-reports-table th {
    height: 38px;
    padding: 0 12px;
    color: #777d85;
    font-size: 7px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid #e5e7ea;
}

.insights-reports-table th:nth-child(1) {
    width: 26%;
}

.insights-reports-table th:nth-child(2) {
    width: 54%;
}

.insights-reports-table th:nth-child(3) {
    width: 12%;
}

.insights-reports-table th:nth-child(4) {
    width: 8%;
    text-align: center;
}

.insights-reports-table td {
    height: 58px;
    padding: 10px 12px;
    color: #555b64;
    font-size: 9px;
    line-height: 1.5;
    vertical-align: middle;
    border-bottom: 1px solid #eeeeee;
}

.insights-reports-table tbody tr:last-child td {
    border-bottom: 0;
}

.insights-reports-table tbody tr:hover {
    background: #fcfcfc;
}

.insights-reports-table td strong {
    color: #252525;
    font-size: 9px;
    font-weight: 600;
}

.insights-reports-table td:nth-child(4) {
    text-align: center;
}


/* Eye Action */

.insight-report-action {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.insight-report-action:hover {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}

.insight-report-action svg {
    width: 13px;
    height: 13px;
}


/* Empty State */

.insights-reports-empty {
    min-height: 220px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
    color: #8a9099;
    text-align: center;
}

.insights-reports-empty.active {
    display: flex;
}

.insights-reports-empty svg {
    width: 26px;
    height: 26px;
    margin-bottom: 9px;
}

.insights-reports-empty strong {
    margin-bottom: 4px;
    color: #555b64;
    font-size: 10px;
}

.insights-reports-empty span {
    font-size: 8px;
}


/* Responsive */

@media (max-width: 900px) {

    .insights-reports-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .insights-report-search {
        width: 100%;
    }

    .insights-reports-table {
        min-width: 760px;
    }

}

/* =========================================================
   USERS
   ========================================================= */

.users-page {
    width: 100%;
}

.users-panel {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e4e7;
    border-radius: 14px;
}


/* Toolbar */

.users-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #eeeeee;
}

.users-search {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.users-search > svg {
    position: absolute;
    top: 50%;
    left: 11px;
    width: 14px;
    height: 14px;
    color: #8a9099;
    pointer-events: none;
    transform: translateY(-50%);
}

.users-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 34px;
    color: #333333;
    font-size: 9px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.users-search input:focus {
    border-color: #bf2532;
}

.users-toolbar select {
    width: 140px;
    height: 38px;
    padding: 0 10px;
    color: #555b64;
    font-size: 9px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.users-apply-btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    color: #ffffff;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    background: #bf2532;
    border: 1px solid #bf2532;
    border-radius: 8px;
}

.users-apply-btn:hover {
    background: #aa1f2c;
}

.users-apply-btn svg {
    width: 13px;
    height: 13px;
}


/* Table */

.users-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.users-table thead {
    background: #fafbfc;
}

.users-table th {
    height: 38px;
    padding: 0 12px;
    color: #777d85;
    font-size: 7px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid #e5e7ea;
}

.users-table td {
    height: 58px;
    padding: 10px 12px;
    color: #555b64;
    font-size: 9px;
    vertical-align: middle;
    border-bottom: 1px solid #eeeeee;
}

.users-table tbody tr:last-child td {
    border-bottom: 0;
}

.users-table tbody tr:hover {
    background: #fcfcfc;
}

.users-table th:nth-child(1) {
    width: 6%;
}

.users-table th:nth-child(2) {
    width: 28%;
}

.users-table th:nth-child(3) {
    width: 30%;
}

.users-table th:nth-child(4) {
    width: 14%;
}

.users-table th:nth-child(5) {
    width: 14%;
}

.users-table th:nth-child(6) {
    width: 8%;
    text-align: center;
}

.users-table td:nth-child(6) {
    text-align: center;
}


/* User name */

.user-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name-cell > div {
    min-width: 0;
}

.user-name-cell strong {
    display: block;
    margin-bottom: 2px;
    color: #252525;
    font-size: 9px;
}

.user-name-cell span {
    display: block;
    color: #8a9099;
    font-size: 8px;
}


/* Avatar */

.user-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #bf2532 !important;
    font-size: 8px !important;
    font-weight: 700;
    background: #fcebed;
    border-radius: 50%;
}


/* Role */

.user-role {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    font-size: 8px;
    font-weight: 600;
    border-radius: 20px;
}

.user-role.admin {
    color: #bf2532;
    background: #fcebed;
}

.user-role.monitor {
    color: #6558c8;
    background: #f0eeff;
}


/* Status */

.user-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    font-size: 8px;
    font-weight: 600;
    border-radius: 20px;
}

.user-status.active {
    color: #198754;
    background: #e9f6ef;
}

.user-status.inactive {
    color: #777d85;
    background: #f1f2f3;
}


/* Edit Button */

.user-edit-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.user-edit-btn:hover {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}

.user-edit-btn svg {
    width: 13px;
    height: 13px;
}


/* Empty State */

.users-empty {
    min-height: 220px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
    color: #8a9099;
    text-align: center;
}

.users-empty.active {
    display: flex;
}

.users-empty svg {
    width: 26px;
    height: 26px;
    margin-bottom: 9px;
}

.users-empty strong {
    margin-bottom: 4px;
    color: #555b64;
    font-size: 10px;
}

.users-empty span {
    font-size: 8px;
}


/* =========================================================
   USER MODAL
   ========================================================= */

.user-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 25000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(28, 31, 36, 0.48);
}

.user-modal-overlay.active {
    display: flex;
}

.user-modal-card {
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(20, 28, 40, 0.18);
}

.user-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px;
    border-bottom: 1px solid #eeeeee;
}

.user-modal-header h2 {
    margin: 0 0 4px;
    color: #252525;
    font-size: 15px;
}

.user-modal-header p {
    margin: 0;
    color: #8a9099;
    font-size: 9px;
}

.user-modal-close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
    cursor: pointer;
}

.user-modal-close svg {
    width: 14px;
    height: 14px;
}

.user-modal-body {
    padding: 18px 20px;
}

.user-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.user-form-group {
    margin-bottom: 12px;
}

.user-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
}

.user-form-group label span {
    color: #bf2532;
}

.user-form-group input,
.user-form-group select {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    color: #252525;
    font-size: 9px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
}

.user-form-group input:focus,
.user-form-group select:focus {
    border-color: #bf2532;
}

.user-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #eeeeee;
}

.user-modal-cancel,
.user-modal-save {
    height: 36px;
    padding: 0 13px;
    font-size: 9px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.user-modal-cancel {
    color: #555b64;
    background: #ffffff;
    border: 1px solid #dedede;
}

.user-modal-save {
    color: #ffffff;
    background: #bf2532;
    border: 1px solid #bf2532;
}


/* Responsive */

@media (max-width: 800px) {

    .users-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .users-search {
        width: 100%;
        flex: auto;
    }

    .users-table {
        min-width: 760px;
    }

}

@media (max-width: 600px) {

    .user-form-grid {
        grid-template-columns: 1fr;
    }

}

/* User Password */

.user-password-field {
    position: relative;
}

.user-password-field input {
    padding-right: 42px;
}

.user-password-show {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777d85;
    cursor: pointer;
    background: transparent;
    border: 0;
    transform: translateY(-50%);
}

.user-password-show svg {
    width: 14px;
    height: 14px;
}

.user-password-help {
    display: block;
    margin-top: 5px;
    color: #8a9099;
    font-size: 8px;
    line-height: 1.5;
}

.user-password-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.user-password-actions button {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 9px;
    color: #555b64;
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.user-password-actions button:hover {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}

.user-password-actions button svg {
    width: 12px;
    height: 12px;
}

/* =========================================================
   SUBSCRIPTION
   ========================================================= */

.subscription-page {
    width: 100%;
}

.subscription-billing-toggle {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 9px;
}

.subscription-billing-toggle button {
    height: 32px;
    padding: 0 13px;
    color: #777d85;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: 7px;
}

.subscription-billing-toggle button.active {
    color: #bf2532;
    background: #fff0f1;
}


/* Plans */

.subscription-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    margin-top: 4px;
}

.subscription-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 520px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e4e7;
    border-radius: 14px;
}

.subscription-plan-card.featured {
    color: #252525;
    background: #fff8f8;
    border-color: #efc8cc;
    box-shadow: 0 10px 28px rgba(191, 37, 50, 0.08);
    transform: translateY(-4px);
}

.subscription-plan-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 8px;
    color: #ffffff;
    font-size: 7px;
    font-weight: 700;
    background: #bf2532;
    border-radius: 20px;
}


/* Top */

.subscription-plan-top {
    min-height: 118px;
}

.subscription-plan-label {
    display: block;
    margin-bottom: 10px;
    color: #bf2532;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.7px;
}

.subscription-plan-card.featured .subscription-plan-label {
    color: #ffb200;
}

.subscription-plan-top h2 {
    margin: 0 0 8px;
    color: #252525;
    font-size: 17px;
}

.subscription-plan-card.featured .subscription-plan-top h2 {
    color: #ffffff;
}

.subscription-plan-top p {
    margin: 0;
    color: #8a9099;
    font-size: 9px;
    line-height: 1.6;
}

.subscription-plan-card.featured .subscription-plan-top p {
    color: #b8bdc5;
}


/* Price */

.subscription-price {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    margin: 12px 0 16px;
}

.subscription-currency {
    margin-bottom: 5px;
    color: #777d85;
    font-size: 9px;
    font-weight: 600;
}

.subscription-plan-card.featured .subscription-currency {
    color: #b8bdc5;
}

.subscription-price strong {
    color: #252525;
    font-size: 30px;
    line-height: 1;
}

.subscription-plan-card.featured .subscription-price strong {
    color: #ffffff;
}

.subscription-price-period {
    margin-bottom: 4px;
    color: #8a9099;
    font-size: 8px;
}

.subscription-plan-card.featured .subscription-price-period {
    color: #b8bdc5;
}


/* Button */

.subscription-plan-btn {
    width: 100%;
    height: 38px;
    color: #bf2532;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #bf2532;
    border-radius: 8px;
}

.subscription-plan-btn:hover {
    color: #ffffff;
    background: #bf2532;
}

.subscription-plan-card.featured .subscription-plan-btn {
    color: #ffffff;
    background: #bf2532;
    border-color: #bf2532;
}

.subscription-plan-card.featured .subscription-plan-btn:hover {
    background: #a91e2b;
}


/* Divider */

.subscription-plan-divider {
    margin: 20px 0;
    border-top: 1px solid #eceef0;
}

.subscription-plan-card.featured .subscription-plan-divider {
    border-color: #34383f;
}


/* Features */

.subscription-plan-features {
    display: grid;
    gap: 11px;
}

.subscription-plan-features h3 {
    margin: 0 0 2px;
    color: #252525;
    font-size: 10px;
}

.subscription-plan-card.featured .subscription-plan-features h3 {
    color: #ffffff;
}

.subscription-feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #555b64;
    font-size: 9px;
    line-height: 1.45;
}

.subscription-plan-card.featured .subscription-feature {
    color: #d0d3d8;
}

.subscription-feature svg {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    margin-top: 1px;
    color: #198754;
}

.subscription-plan-card.featured .subscription-feature svg {
    color: #56d493;
}


/* Note */

.subscription-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 11px 13px;
    color: #777d85;
    font-size: 8px;
    line-height: 1.5;
    background: #ffffff;
    border: 1px solid #e2e4e7;
    border-radius: 9px;
}

.subscription-note svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    color: #bf2532;
}


/* Responsive */

@media (max-width: 1000px) {

    .subscription-plans {
        grid-template-columns: 1fr;
    }

    .subscription-plan-card.featured {
        transform: none;
    }

    .subscription-plan-card {
        min-height: auto;
    }

}

@media (max-width: 600px) {

    .subscription-billing-toggle {
        width: 100%;
    }

    .subscription-billing-toggle button {
        flex: 1;
    }

}

/* =========================================================
   SUBSCRIPTION - DASHBOARD CARD STYLE
   ========================================================= */

.subscription-plan-card,
.subscription-plan-card.featured {
    min-height: 520px;
    color: #252525;
    box-shadow: none;
    transform: none;
}


/* Starter - Purple */

.subscription-plan-card:nth-child(1) {
    background: #f7f5ff;
    border-color: #ddd8ff;
}

.subscription-plan-card:nth-child(1) .subscription-plan-label,
.subscription-plan-card:nth-child(1) .subscription-price strong {
    color: #6558c8;
}

.subscription-plan-card:nth-child(1) .subscription-plan-btn {
    color: #6558c8;
    background: #ffffff;
    border-color: #bdb5f5;
}

.subscription-plan-card:nth-child(1) .subscription-plan-btn:hover {
    color: #ffffff;
    background: #6558c8;
    border-color: #6558c8;
}


/* Professional - Green */

.subscription-plan-card:nth-child(2),
.subscription-plan-card.featured {
    color: #252525;
    background: #f0faf5;
    border-color: #bfe5d1;
}

.subscription-plan-card:nth-child(2) .subscription-plan-label,
.subscription-plan-card:nth-child(2) .subscription-price strong {
    color: #198754;
}

.subscription-plan-card:nth-child(2) .subscription-plan-btn {
    color: #ffffff;
    background: #198754;
    border-color: #198754;
}

.subscription-plan-card:nth-child(2) .subscription-plan-btn:hover {
    background: #146c43;
    border-color: #146c43;
}


/* Business - Yellow */

.subscription-plan-card:nth-child(3) {
    background: #fff9e9;
    border-color: #f0d78e;
}

.subscription-plan-card:nth-child(3) .subscription-plan-label,
.subscription-plan-card:nth-child(3) .subscription-price strong {
    color: #b77900;
}

.subscription-plan-card:nth-child(3) .subscription-plan-btn {
    color: #b77900;
    background: #ffffff;
    border-color: #e2bd55;
}

.subscription-plan-card:nth-child(3) .subscription-plan-btn:hover {
    color: #ffffff;
    background: #b77900;
    border-color: #b77900;
}


/* Reset old featured white text */

.subscription-plan-card.featured .subscription-plan-top h2,
.subscription-plan-card.featured .subscription-plan-features h3 {
    color: #252525;
}

.subscription-plan-card.featured .subscription-plan-top p,
.subscription-plan-card.featured .subscription-currency,
.subscription-plan-card.featured .subscription-price-period {
    color: #8a9099;
}

.subscription-plan-card.featured .subscription-feature {
    color: #555b64;
}

.subscription-plan-card.featured .subscription-feature svg {
    color: #198754;
}

.subscription-plan-card.featured .subscription-plan-divider {
    border-color: #d9eadf;
}


/* Common text */

.subscription-plan-top h2 {
    color: #252525;
}

.subscription-plan-top p {
    color: #7f8791;
}

.subscription-currency,
.subscription-price-period {
    color: #8a9099;
}

.subscription-plan-features h3 {
    color: #252525;
}

.subscription-feature {
    color: #555b64;
}

.subscription-feature svg {
    color: #198754;
}


/* Recommended badge */

.subscription-plan-badge {
    color: #ffffff;
    background: #bf2532;
}

/* =========================================================
   SUBSCRIPTION - PREMIUM 3D FINAL STYLE
   ========================================================= */

.subscription-plans {
    gap: 16px;
    perspective: 1200px;
}


/* Base Card */

.subscription-plan-card,
.subscription-plan-card.featured {
    --plan-accent: #6558c8;
    --plan-soft: #f5f3ff;
    --plan-border: #d9d4ff;

    position: relative;
    isolation: isolate;
    overflow: hidden;

    min-height: 520px;
    padding: 22px;

    color: #252525;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            var(--plan-soft) 100%
        );

    border: 1px solid var(--plan-border);
    border-radius: 16px;

    box-shadow:
        0 2px 3px rgba(20, 28, 40, 0.03),
        0 8px 18px rgba(20, 28, 40, 0.06),
        0 20px 45px rgba(20, 28, 40, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    transform: none;

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


/* Individual Plan Colors */

.subscription-plan-card:nth-child(1) {
    --plan-accent: #6558c8;
    --plan-soft: #f4f2ff;
    --plan-border: #d9d4ff;
}

.subscription-plan-card:nth-child(2) {
    --plan-accent: #198754;
    --plan-soft: #edf9f3;
    --plan-border: #bce4cf;
}

.subscription-plan-card:nth-child(3) {
    --plan-accent: #d99000;
    --plan-soft: #fff7df;
    --plan-border: #f0d588;
}


/* Decorative 3D Circles */

.subscription-plan-card::before {
    content: "";
    position: absolute;

    width: 190px;
    height: 190px;

    top: -100px;
    right: -70px;

    z-index: -1;

    border: 1px solid
        color-mix(
            in srgb,
            var(--plan-accent) 20%,
            transparent
        );

    border-radius: 50%;
}

.subscription-plan-card::after {
    content: "";
    position: absolute;

    width: 120px;
    height: 120px;

    top: -48px;
    right: -27px;

    z-index: -1;

    background:
        radial-gradient(
            circle,
            color-mix(
                in srgb,
                var(--plan-accent) 16%,
                transparent
            ) 0%,
            transparent 68%
        );

    border-radius: 50%;
}


/* Hover */

.subscription-plan-card:hover {
    transform: translateY(-5px);

    border-color:
        color-mix(
            in srgb,
            var(--plan-accent) 45%,
            #ffffff
        );

    box-shadow:
        0 4px 6px rgba(20, 28, 40, 0.04),
        0 14px 30px rgba(20, 28, 40, 0.09),
        0 28px 55px rgba(20, 28, 40, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}


/* Recommended Card */

.subscription-plan-card.featured {
    transform: translateY(-5px);

    box-shadow:
        0 4px 6px rgba(25, 135, 84, 0.05),
        0 15px 35px rgba(25, 135, 84, 0.10),
        0 28px 55px rgba(20, 28, 40, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.subscription-plan-card.featured:hover {
    transform: translateY(-8px);
}


/* Keep Content Above Decoration */

.subscription-plan-card > *:not(.subscription-plan-badge) {
    position: relative;
    z-index: 2;
}

.subscription-plan-card .subscription-plan-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    left: auto;

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

    padding: 5px 9px;

    z-index: 5;
}


/* Plan Badge */

.subscription-plan-badge {
    top: 15px;
    right: 15px;

    padding: 5px 9px;

    color: #ffffff;

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

    background:
        linear-gradient(
            135deg,
            #d52c3b,
            #b91f2d
        );

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

    box-shadow:
        0 4px 10px rgba(191, 37, 50, 0.20);
}


/* Top Content */

.subscription-plan-top {
    min-height: 118px;
}

.subscription-plan-label,
.subscription-plan-card.featured .subscription-plan-label {
    color: var(--plan-accent);

    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.subscription-plan-top h2,
.subscription-plan-card.featured .subscription-plan-top h2 {
    margin-top: 0;

    color: #17191d;

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

.subscription-plan-top p,
.subscription-plan-card.featured .subscription-plan-top p {
    max-width: 90%;

    color: #7c8490;

    font-size: 9px;
    line-height: 1.65;
}


/* Price */

.subscription-price {
    align-items: flex-end;

    margin: 14px 0 17px;
}

.subscription-price strong,
.subscription-plan-card.featured .subscription-price strong {
    color: var(--plan-accent);

    font-size: 31px;
    font-weight: 750;

    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8);
}

.subscription-currency,
.subscription-plan-card.featured .subscription-currency,
.subscription-price-period,
.subscription-plan-card.featured .subscription-price-period {
    color: #838b95;
}


/* Button */

.subscription-plan-btn,
.subscription-plan-card.featured .subscription-plan-btn {
    position: relative;

    width: 100%;
    height: 40px;

    overflow: hidden;

    color: var(--plan-accent);

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

    cursor: pointer;

    background: rgba(255, 255, 255, 0.80);

    border: 1px solid
        color-mix(
            in srgb,
            var(--plan-accent) 58%,
            #ffffff
        );

    border-radius: 9px;

    box-shadow:
        0 3px 8px rgba(20, 28, 40, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

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


/* Recommended Button */

.subscription-plan-card.featured .subscription-plan-btn {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #20945f,
            #167847
        );

    border-color: #198754;

    box-shadow:
        0 5px 14px rgba(25, 135, 84, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}


.subscription-plan-btn:hover {
    color: #ffffff;

    background: var(--plan-accent);

    transform: translateY(-1px);

    box-shadow:
        0 6px 14px
        color-mix(
            in srgb,
            var(--plan-accent) 22%,
            transparent
        );
}

.subscription-plan-card.featured .subscription-plan-btn:hover {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #198754,
            #126c3f
        );
}


/* Divider */

.subscription-plan-divider,
.subscription-plan-card.featured .subscription-plan-divider {
    margin: 20px 0;

    border-color:
        color-mix(
            in srgb,
            var(--plan-accent) 13%,
            #e7e9ec
        );
}


/* Features */

.subscription-plan-features h3,
.subscription-plan-card.featured .subscription-plan-features h3 {
    color: #202327;

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

.subscription-feature,
.subscription-plan-card.featured .subscription-feature {
    color: #58616c;
}

.subscription-feature svg,
.subscription-plan-card.featured .subscription-feature svg {
    width: 14px;
    height: 14px;

    color: #198754;

    stroke-width: 2.4;
}


/* Billing Toggle - More Premium */

.subscription-billing-toggle {
    padding: 4px;

    background: rgba(255, 255, 255, 0.9);

    border: 1px solid #e0e3e6;
    border-radius: 11px;

    box-shadow:
        0 4px 12px rgba(20, 28, 40, 0.05),
        inset 0 1px 0 #ffffff;
}

.subscription-billing-toggle button {
    height: 31px;

    border-radius: 8px;

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

.subscription-billing-toggle button.active {
    color: #bf2532;

    background:
        linear-gradient(
            135deg,
            #fff4f5,
            #fdebed
        );

    box-shadow:
        0 2px 6px rgba(191, 37, 50, 0.08);
}


/* Responsive */

@media (max-width: 1000px) {

    .subscription-plan-card,
    .subscription-plan-card.featured {
        transform: none;
    }

    .subscription-plan-card:hover,
    .subscription-plan-card.featured:hover {
        transform: none;
    }

}

/* =========================================================
   SETTINGS
   ========================================================= */

.settings-page {
    width: 100%;
}

.settings-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}


/* =========================================================
   SETTINGS CARD
   ========================================================= */

.settings-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #fbfbfc 100%
        );
    border: 1px solid #e2e4e7;
    border-radius: 14px;
    box-shadow:
        0 2px 4px rgba(20, 28, 40, 0.02),
        0 8px 22px rgba(20, 28, 40, 0.035);
}

.settings-card-full {
    grid-column: 1 / -1;
}


/* Header */

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 70px;
    padding: 16px 18px;
    border-bottom: 1px solid #eeeeee;
}

.settings-card-header > div {
    min-width: 0;
}

.settings-card-header h2 {
    margin: 0 0 3px;
    color: #252525;
    font-size: 13px;
    font-weight: 700;
}

.settings-card-header p {
    margin: 0;
    color: #8a9099;
    font-size: 8px;
    line-height: 1.5;
}


/* Header Icons */

.settings-card-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.settings-card-icon svg {
    width: 17px;
    height: 17px;
}

.settings-card-icon.general {
    color: #6558c8;
    background: #f0eeff;
    border: 1px solid #ddd8ff;
}

.settings-card-icon.reminder {
    color: #bf2532;
    background: #fcebed;
    border: 1px solid #f3d1d5;
}

.settings-card-icon.notification {
    color: #198754;
    background: #e9f6ef;
    border: 1px solid #cfeada;
}


/* =========================================================
   FORM
   ========================================================= */

.settings-card-body {
    padding: 18px;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.settings-form-group {
    margin-bottom: 14px;
}

.settings-form-group:last-child {
    margin-bottom: 0;
}

.settings-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
}

.settings-form-group input,
.settings-form-group select {
    width: 100%;
    height: 40px;
    padding: 0 11px;
    color: #252525;
    font-size: 9px;
    outline: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 8px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.settings-form-group input:focus,
.settings-form-group select:focus {
    border-color: #bf2532;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.07);
}

.settings-field-help {
    display: block;
    margin-top: 5px;
    color: #949aa2;
    font-size: 7px;
    line-height: 1.5;
}


/* =========================================================
   NOTIFICATIONS
   ========================================================= */

.settings-notification-list {
    display: grid;
    gap: 10px;
}

.settings-notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e7e8ea;
    border-radius: 10px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.settings-notification-item:hover {
    border-color: #d9dce0;
    box-shadow: 0 5px 14px rgba(20, 28, 40, 0.04);
    transform: translateY(-1px);
}

.settings-notification-info {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-notification-info > div {
    min-width: 0;
}

.settings-notification-info strong {
    display: block;
    margin-bottom: 3px;
    color: #252525;
    font-size: 9px;
    font-weight: 650;
}

.settings-notification-info > div > span {
    display: block;
    color: #8a9099;
    font-size: 8px;
    line-height: 1.45;
}


/* Notification Icons */

.settings-notification-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.settings-notification-icon svg {
    width: 14px;
    height: 14px;
}

.settings-notification-icon.email {
    color: #1686a7;
    background: #e8f7fc;
}

.settings-notification-icon.sms {
    color: #6558c8;
    background: #f0eeff;
}

.settings-notification-icon.whatsapp {
    color: #198754;
    background: #e9f6ef;
}


/* =========================================================
   TOGGLE SWITCH
   ========================================================= */

.settings-switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex: 0 0 40px;
    cursor: pointer;
}

.settings-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.settings-switch > span {
    position: absolute;
    inset: 0;
    background: #d8dce1;
    border-radius: 20px;
    transition: 0.2s ease;
}

.settings-switch > span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(20, 28, 40, 0.18);
    transition: 0.2s ease;
}

.settings-switch input:checked + span {
    background: #bf2532;
}

.settings-switch input:checked + span::after {
    transform: translateX(18px);
}


/* =========================================================
   PREMIUM DETAIL
   ========================================================= */

.settings-card::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 150px;
    height: 150px;
    pointer-events: none;
    border: 1px solid rgba(191, 37, 50, 0.05);
    border-radius: 50%;
}

.settings-card:nth-child(1)::after {
    border-color: rgba(101, 88, 200, 0.08);
}

.settings-card:nth-child(2)::after {
    border-color: rgba(191, 37, 50, 0.08);
}

.settings-card:nth-child(3)::after {
    border-color: rgba(25, 135, 84, 0.08);
}


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

@media (max-width: 900px) {

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-card-full {
        grid-column: auto;
    }

}

@media (max-width: 600px) {

    .settings-form-grid {
        grid-template-columns: 1fr;
    }

    .settings-card-header,
    .settings-card-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .settings-notification-item {
        align-items: flex-start;
    }

}

/* Settings Save Button - standard page action size */

.settings-save-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;

    color: #ffffff;
    font-size: 9px;
    font-weight: 600;

    cursor: pointer;

    background: #bf2532;
    border: 1px solid #bf2532;
    border-radius: 7px;

    box-shadow: 0 4px 10px rgba(191, 37, 50, 0.12);
}

.settings-save-btn:hover {
    background: #aa1f2c;
    border-color: #aa1f2c;
}

.settings-save-btn svg {
    width: 13px;
    height: 13px;
}

.users-add-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;

    color: #ffffff;
    font-size: 9px;
    font-weight: 600;

    cursor: pointer;

    background: #bf2532;
    border: 1px solid #bf2532;
    border-radius: 7px;

    box-shadow: 0 4px 10px rgba(191, 37, 50, 0.12);
}

.users-add-btn:hover {
    background: #aa1f2c;
    border-color: #aa1f2c;
}

.users-add-btn svg {
    width: 13px;
    height: 13px;
}

/* =========================================================
   USERS TABLE - SIZE POLISH
   ========================================================= */

.users-table th {
    font-size: 8px;
}

.users-table td {
    height: 64px;
    font-size: 9.5px;
}

.user-name-cell strong {
    font-size: 10px;
    font-weight: 650;
}

.user-name-cell > div > span {
    margin-top: 2px;
    font-size: 8.5px;
}

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

    font-size: 8.5px !important;
}

.user-role,
.user-status {
    min-height: 23px;
    padding: 0 9px;

    font-size: 8.5px;
}

.user-edit-btn {
    width: 31px;
    height: 31px;
}

.user-edit-btn svg {
    width: 13px;
    height: 13px;
}

/* =========================================================
   REMINDER ACTION MENU
   ========================================================= */

.reminder-action-menu {
    position: fixed;
    z-index: 100000;

    width: 170px;
    display: none;

    padding: 6px;

    background: #ffffff;
    border: 1px solid #e3e5e8;
    border-radius: 9px;

    box-shadow:
        0 12px 35px rgba(20, 28, 40, 0.14);
}

.reminder-action-menu.show {
    display: block;
}

.reminder-action-menu button {
    width: 100%;
    height: 34px;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 0 10px;

    color: #4f555d;
    font-size: 9px;
    font-weight: 500;

    text-align: left;

    background: transparent;
    border: 0;
    border-radius: 6px;

    cursor: pointer;
}

.reminder-action-menu button:hover {
    background: #f5f6f7;
}

.reminder-action-menu button.danger {
    color: #bf2532;
}

.reminder-action-menu button.danger:hover {
    background: #fff1f2;
}

.reminder-action-menu svg {
    width: 13px;
    height: 13px;
}


/* =========================================================
   REMINDER DETAILS
   ========================================================= */

.reminder-details-modal {
    position: fixed;
    inset: 0;
    z-index: 110000;

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

    padding: 20px;

    background: rgba(24, 28, 34, 0.38);
    backdrop-filter: blur(2px);
}

.reminder-details-modal.show {
    display: flex;
}

.reminder-details-card {
    width: 100%;
    max-width: 470px;

    overflow: hidden;

    background: #ffffff;
    border: 1px solid #e2e4e7;
    border-radius: 13px;

    box-shadow:
        0 20px 55px rgba(20, 28, 40, 0.18);
}

.reminder-details-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    padding: 18px 20px;

    border-bottom: 1px solid #eeeeee;
}

.reminder-details-type {
    display: inline-flex;

    margin-bottom: 6px;
    padding: 4px 8px;

    color: #bf2532;
    font-size: 7px;
    font-weight: 700;

    background: #fcebed;
    border-radius: 20px;
}

.reminder-details-header h3 {
    margin: 0;

    color: #252525;
    font-size: 15px;
}

.reminder-details-close {
    width: 31px;
    height: 31px;

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

    color: #777d85;

    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.reminder-details-close svg {
    width: 14px;
    height: 14px;
}

.reminder-details-body {
    padding: 10px 20px 20px;
}

.reminder-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 11px 0;

    border-bottom: 1px solid #f0f0f0;
}

.reminder-detail-row span,
.reminder-detail-description > span {
    color: #8a9099;
    font-size: 8px;
}

.reminder-detail-row strong {
    color: #333333;
    font-size: 9px;
    font-weight: 600;
    text-align: right;
}

.reminder-detail-description {
    padding-top: 13px;
}

.reminder-detail-description p {
    margin: 6px 0 0;

    color: #555b64;
    font-size: 9px;
    line-height: 1.6;
}

/* =========================================================
   FLASH MESSAGES
   ========================================================= */

.flash-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.flash-message > svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.flash-message > span {
    flex: 1;
}

.flash-message.success {
    background: var(--success-soft);
    border-color: #bfe3cf;
    color: var(--success);
}

.flash-message.error {
    background: var(--primary-soft);
    border-color: #f3c3c8;
    color: var(--primary-dark);
}

.flash-close {
    display: inline-flex;
    padding: 2px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

.flash-close svg {
    width: 15px;
    height: 15px;
}

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

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.row-actions form {
    margin: 0;
}

.user-delete-btn:hover,
.company-action-btn.danger:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.table-empty-state {
    padding: 36px 16px !important;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* =========================================================
   AUTH / LOGIN
   ========================================================= */

.auth-body {
    min-height: 100vh;
    background: var(--surface);
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* Brand panel */

.auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
    padding: 44px 52px;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 178, 0, 0.28), transparent 32%),
        linear-gradient(145deg, #c42a37 0%, #a91e2b 55%, #7d1520 100%);
    color: #ffffff;
}

.auth-showcase-content {
    position: relative;
    z-index: 1;
    max-width: 460px;
    margin: auto 0;
}

.auth-showcase-content h2 {
    margin: 0 0 14px;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.auth-showcase-content p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.6;
}

.auth-feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 500;
}

.auth-feature-list li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.auth-feature-list svg {
    width: 17px;
    height: 17px;
}

.auth-showcase-cards {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.auth-stat-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 16px 12px 12px;
    border-radius: 13px;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 12px 30px rgba(60, 8, 14, 0.25);
}

.auth-stat-card strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.auth-stat-card small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
}

.auth-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.auth-stat-icon svg {
    width: 17px;
    height: 17px;
}

.auth-stat-icon.warning {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.auth-stat-icon.success {
    background: var(--success-soft);
    color: var(--success);
}

.auth-circle {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    pointer-events: none;
}

.auth-circle-one {
    right: -120px;
    bottom: -120px;
    width: 420px;
    height: 420px;
}

.auth-circle-two {
    right: -40px;
    bottom: -40px;
    width: 260px;
    height: 260px;
    background: rgba(255, 255, 255, 0.05);
}

/* Form panel */

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--surface);
}

.auth-card {
    width: 100%;
    max-width: 380px;
}

.auth-logo {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
    margin: 0 0 32px;
}

.auth-card h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    margin: 0 0 28px;
    color: var(--text-muted);
    font-size: 14px;
}

.auth-card .flash-message {
    margin-bottom: 20px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-form-group label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input > svg {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
}

.auth-input input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fafbfc;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-input input::placeholder {
    color: #a3a8b0;
}

.auth-input input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.auth-input:focus-within > svg {
    color: var(--primary);
}

.auth-password-toggle {
    position: absolute;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
}

.auth-password-toggle:hover {
    background: #f0f1f3;
    color: var(--text);
}

.auth-password-toggle svg {
    width: 17px;
    height: 17px;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    margin-top: 6px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(191, 37, 50, 0.25);
    transition: background 0.15s ease, transform 0.15s ease;
}

.auth-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.auth-submit svg {
    width: 17px;
    height: 17px;
}

.auth-footer {
    margin: 36px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
    }
}

/* =========================================================
   USERS - ASSIGNED COMPANIES
   ========================================================= */

.user-companies-cell {
    max-width: 260px;
}

.user-company-chip {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.user-company-all {
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
}

.user-company-none {
    color: #c62828;
    font-size: 10px;
    font-weight: 600;
}

/* Multi-select company dropdown (scoped to win over .user-form-group label/input) */

.company-select {
    position: relative;
}

.company-select .company-select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 5px 10px;
    border: 1px solid #dedede;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.company-select .company-select-trigger:focus,
.company-select.open .company-select-trigger {
    outline: none;
    border-color: #bf2532;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.08);
}

.company-select .company-select-values {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.company-select .company-select-placeholder {
    color: #9a9fa6;
    font-size: 9px;
    line-height: 24px;
}

.company-select .company-select-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 5px 4px 9px;
    border-radius: 999px;
    background: #fbe9eb;
    color: #bf2532;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.2;
}

.company-select .company-select-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.company-select .company-select-chip-remove:hover {
    background: #bf2532;
    color: #ffffff;
}

.company-select .company-select-arrow {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    color: #7a8089;
    transition: transform 0.2s;
}

.company-select.open .company-select-arrow {
    transform: rotate(180deg);
}

.company-select .company-select-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(20, 28, 40, 0.14);
    overflow: hidden;
}

.company-select.open .company-select-menu {
    display: block;
}

.company-select .company-select-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-bottom: 1px solid #f0f0f0;
}

.company-select .company-select-search i,
.company-select .company-select-search svg {
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    color: #9a9fa6;
}

.company-select .company-select-search input {
    flex: 1;
    width: auto;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 0;
    font-size: 9px;
    background: transparent;
    box-shadow: none;
}

.company-select .company-select-options {
    max-height: 180px;
    overflow-y: auto;
    padding: 4px;
}

.company-select .company-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 6px;
    color: #252525;
    font-size: 9px;
    font-weight: 500;
    cursor: pointer;
}

.company-select .company-select-option span {
    color: inherit;
}

.company-select .company-select-option:hover {
    background: #f6f6f7;
}

.company-select .company-select-option input {
    display: none;
}

.company-select .company-select-check {
    width: 13px;
    height: 13px;
    color: #bf2532;
    visibility: hidden;
}

.company-select .company-select-option:has(input:checked) {
    background: #fbe9eb;
    color: #bf2532;
    font-weight: 600;
}

.company-select .company-select-option:has(input:checked) .company-select-check {
    visibility: visible;
}

.company-select .company-select-empty {
    display: none;
    padding: 12px;
    color: #9a9fa6;
    font-size: 9px;
    text-align: center;
}


/* =========================================================
   DEPARTMENTS - LIVE DATA
   ========================================================= */

.department-menu-wrap {
    position: relative;
}

.department-menu-popover {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 20;
    min-width: 130px;
    padding: 4px;
    border: 1px solid #ececec;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(20, 28, 40, 0.12);
}

.department-menu-wrap.open .department-menu-popover {
    display: block;
}

.department-menu-popover form {
    margin: 0;
}

.department-menu-popover button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #252525;
    font-size: 10px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.department-menu-popover button:hover {
    background: #f5f5f5;
}

.department-menu-popover button.danger {
    color: #bf2532;
}

.department-menu-popover button.danger:hover {
    background: #fdecec;
}

.department-menu-popover svg {
    width: 13px;
    height: 13px;
}

.department-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 10px;
}

.department-head svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.department-status.inactive {
    color: #6b7280;
    background: #f1f2f4;
}

.department-status.inactive::before {
    background: #9ca3af;
}

.department-empty {
    padding: 36px 12px 18px;
}

.department-empty[hidden] {
    display: none;
}

.department-stats .department-danger strong {
    color: #bf2532;
}

/* =========================================================
   EMPLOYEES - LIVE DATA
   ========================================================= */

.employee-department {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.employee-department small {
    color: #8a8a8a;
    font-size: 9px;
}

.employee-clear-filters {
    color: #bf2532;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.employee-clear-filters:hover {
    text-decoration: underline;
}

.employee-date.contract > svg {
    color: #bf2532;
}

.employee-document-status span.muted {
    color: #aaaaaa;
}

.employees-table .row-actions form {
    margin: 0;
}

.employee-row-menu.danger:hover {
    color: #ffffff;
    background: #bf2532;
}

.employees-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 4px 2px;
    color: #8a8a8a;
    font-size: 10px;
}

.employees-pagination .pagination {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.employees-pagination .pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #e3e3e3;
    border-radius: 7px;
    color: #444444;
    font-size: 10px;
    text-decoration: none;
}

.employees-pagination .pagination a:hover {
    border-color: #bf2532;
    color: #bf2532;
}

.employees-pagination .pagination .active a {
    border-color: #bf2532;
    background: #bf2532;
    color: #ffffff;
}

@media (max-width: 900px) {
    .employee-filters {
        flex-wrap: wrap;
    }
}


/* =========================================================
   DATE PICKER (public/assets/js/datepicker.js)
   ========================================================= */

input.es-date-input {
    padding-right: 34px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a9fa6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 15px 15px;
    cursor: pointer;
}

.es-datepicker {
    display: none;
    position: fixed;
    z-index: 10000;
    width: 264px;
    padding: 12px;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(20, 28, 40, 0.16);
    font-family: Inter, sans-serif;
    user-select: none;
}

.es-datepicker.open {
    display: block;
}

.es-dp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.es-dp-title {
    display: flex;
    gap: 2px;
}

.es-dp-title-btn {
    padding: 6px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #252525;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.es-dp-title-btn:hover,
.es-dp-title-btn.active {
    background: #fbe9eb;
    color: #bf2532;
}

.es-dp-nav {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #555555;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.es-dp-nav:hover:not(:disabled) {
    background: #f5f5f6;
    color: #bf2532;
}

.es-dp-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.es-dp-grid {
    display: grid;
    gap: 2px;
}

.es-dp-grid.days {
    grid-template-columns: repeat(7, 1fr);
}

.es-dp-grid.months,
.es-dp-grid.years {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px 0;
}

.es-dp-weekday {
    padding: 4px 0;
    color: #9a9fa6;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
}

.es-dp-cell {
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #252525;
    font-size: 12px;
    cursor: pointer;
}

.es-dp-grid.months .es-dp-cell,
.es-dp-grid.years .es-dp-cell {
    height: 40px;
    font-weight: 500;
}

.es-dp-cell:hover:not(:disabled) {
    background: #f5f5f6;
}

.es-dp-cell.today {
    color: #bf2532;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #f0c4c8;
}

.es-dp-cell.current {
    background: #f5f5f6;
}

.es-dp-cell.selected,
.es-dp-cell.selected:hover {
    background: #bf2532;
    color: #ffffff;
    font-weight: 700;
    box-shadow: none;
}

.es-dp-cell:disabled {
    color: #d0d0d0;
    cursor: default;
}

.es-dp-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.es-dp-foot button {
    padding: 6px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #bf2532;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.es-dp-foot button:hover:not(:disabled) {
    background: #fbe9eb;
}

.es-dp-foot button:disabled {
    color: #c8c8c8;
    cursor: default;
}

.es-dp-foot .es-dp-clear {
    color: #6b7280;
}

.es-dp-foot {
    align-items: center;
}

.es-dp-hint {
    color: #a0a4ab;
    font-size: 10px;
}

input.es-date-input.es-date-invalid {
    border-color: #bf2532 !important;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.08);
}


/* =========================================================
   DOCUMENT TYPES - LIVE DATA
   ========================================================= */

.document-type-name-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.document-type-name-text small {
    color: #8a8a8a;
    font-size: 9px;
}

.document-types-table .row-actions form {
    margin: 0;
}

.document-type-action-btn.danger:hover {
    color: #ffffff;
    background: #bf2532;
}

#documentTypesEmpty[hidden] {
    display: none;
}


/* =========================================================
   REMINDER SEQUENCES - LIVE DATA
   ========================================================= */

.sequence-status.inactive {
    background: #F1F1F1;
    color: #777777;
}

.sequence-row-timeline {
    display: block;
    margin-top: 3px;
    color: #8a8a8a;
    font-size: 10px;
    max-width: 260px;
}

.sequence-name .sequence-row-usage {
    margin-top: 3px;
    color: #916600;
    font-size: 10px;
}

.sequence-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sequence-row-actions form,
.sequence-default-cell form {
    margin: 0;
}

.sequence-action-btn.danger:hover {
    color: #ffffff;
    background: #bf2532;
    border-color: #bf2532;
}

.sequence-employee-count {
    color: #858585;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.sequence-employee-empty {
    padding: 14px;
    color: #858585;
    font-size: 12px;
}

.sequence-step .is-muted {
    background: #F5F5F5;
    color: #AAAAAA;
}

#sequencesEmpty[hidden] {
    display: none;
}


/* =========================================================
   TEMPLATES - LIVE DATA
   ========================================================= */

.template-name-cell .template-usage {
    display: block;
    margin-top: 2px;
    color: #916600;
    font-size: 9px;
}

.template-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.template-row-actions form {
    margin: 0;
}

.template-action-btn.danger:hover {
    color: #ffffff;
    background: #bf2532;
    border-color: #bf2532;
}

.template-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

#templateMessageCounter {
    white-space: nowrap;
}

#templateMessageCounter.over {
    color: #bf2532;
    font-weight: 600;
}

.template-variables {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.template-variable-chip {
    padding: 4px 8px;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    background: #fafafa;
    color: #555555;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
}

.template-variable-chip:hover {
    border-color: #bf2532;
    color: #bf2532;
    background: #fff5f6;
}

#templatesEmpty[hidden] {
    display: none;
}


/* =========================================================
   DOCUMENTS - LIVE DATA
   ========================================================= */

.document-action-menu a {
    width: 100%;
    min-height: 33px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 6px;
    color: #555555;
    font-size: 10px;
    text-decoration: none;
    box-sizing: border-box;
}

.document-action-menu a:hover {
    background: #f6f7f8;
    color: #252525;
}

.document-action-menu a svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.document-action-menu form {
    margin: 0;
}

.document-status.none {
    background: #F1F1F1;
    color: #777777;
}

.document-expiry strong,
.document-expiry span {
    display: block;
}

.document-expiry strong {
    font-weight: 500;
}

.document-expiry span {
    margin-top: 2px;
    color: #8a8a8a;
    font-size: 9px;
}

.document-expiry span.is-expired {
    color: #bf2532;
}

.document-name-cell .document-clip {
    display: inline-block;
    width: 10px;
    height: 10px;
    vertical-align: -1px;
}

#uploadDocumentModal .required-mark {
    color: #bf2532;
}

#uploadDocumentModal .document-upload-area strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-pagination {
    padding: 0 14px 14px;
}


/* =========================================================
   TASKS - LIVE DATA
   ========================================================= */

.document-status.in-progress {
    background: #E8F0FE;
    color: #1A5FB4;
}

.tasks-table .task-icon.valid {
    background: #E8F5EE;
    color: #198754;
}

.tasks-table .task-icon.expired {
    background: #FBEAEC;
    color: #bf2532;
}

.tasks-table .task-icon.in-progress {
    background: #E8F0FE;
    color: #1A5FB4;
}

.tasks-table .task-icon.none {
    background: #F3F3F3;
    color: #777777;
}

.task-row-completed .document-name-cell strong {
    color: #8a8a8a;
    text-decoration: line-through;
}

.task-muted {
    color: #aaaaaa;
    font-weight: 500;
}

#newTaskModal .required-mark {
    color: #bf2532;
}


/* =========================================================
   ASSET PAGES (Vehicles, Equipment, Locations) - live data
   ========================================================= */

.vehicle-status.none,
.equipment-status.none,
.location-status.none {
    background: #f1f1f1;
    color: #777777;
}

.asset-inactive-tag {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    border-radius: 10px;
    background: #f1f1f1;
    color: #888888;
    font-size: 8px;
    font-style: normal;
    font-weight: 600;
    vertical-align: middle;
}

.vehicle-form-group label span,
.equipment-form-group label span,
.location-form-group label span {
    color: #bf2532;
}

.asset-modal-error {
    margin-bottom: 14px;
}

.vehicles-filters .employee-clear-filters,
.equipment-filters .employee-clear-filters,
.locations-filters .employee-clear-filters {
    white-space: nowrap;
}


/* =========================================================
   REMINDERS - live data
   ========================================================= */

.reminder-table-icon.custom,
.reminder-type-badge.custom {
    color: #5f6670;
    background: #f1f2f4;
}

.reminder-action-menu form {
    margin: 0;
}

.reminder-action-menu a {
    height: 34px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border-radius: 6px;
    color: #4f555d;
    font-size: 9px;
    font-weight: 500;
    text-decoration: none;
}

.reminder-action-menu a:hover {
    background: #f5f6f7;
}

.custom-form-group input[readonly] {
    background: #f7f7f8;
    color: #6b7078;
    cursor: default;
}

.custom-reminder-body .flash-message {
    margin-bottom: 4px;
}

.reminder-filters .employee-clear-filters {
    white-space: nowrap;
}

/* Reminder form - searchable Related Item */
.reminder-related-picker {
    position: relative;
}

.reminder-related-results {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    max-height: 240px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #e3e5e8;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(20, 28, 40, 0.12);
}

.reminder-related-results.show {
    display: block;
}

.reminder-related-results button {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.reminder-related-results button:hover,
.reminder-related-results button.active {
    background: #fbeaec;
}

.reminder-related-results strong {
    color: #343434;
    font-size: 11px;
    font-weight: 600;
}

.reminder-related-results span {
    color: #8b8b8b;
    font-size: 10px;
}

.reminder-related-empty {
    padding: 9px 10px;
    color: #8b8b8b;
    font-size: 10px;
}


/* =========================================================
   DRIVE - live data
   ========================================================= */

a.drive-primary-btn,
a.drive-folder-card,
a.drive-action-btn {
    text-decoration: none;
}

a.drive-folder-card {
    box-sizing: border-box;
    color: inherit;
}

.drive-row-actions {
    display: inline-flex;
    gap: 6px;
}

.drive-owner-cell {
    min-width: 150px;
}

.drive-detail-actions a {
    height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
}

.drive-detail-actions a svg {
    width: 13px;
    height: 13px;
}

.drive-detail-actions a:hover {
    color: #bf2532;
    background: #fff5f6;
    border-color: #efc8cc;
}

.drive-detail-note {
    color: #8a9099;
    font-size: 8px;
    line-height: 1.5;
}

.drive-toolbar-left .employee-clear-filters {
    white-space: nowrap;
}


/* =========================================================
   CALENDAR - live data
   ========================================================= */

.calendar-event-popover-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: #bf2532;
    font-size: 9px;
    font-weight: 600;
    text-decoration: none;
}

.calendar-event-popover-link:hover {
    text-decoration: underline;
}

.calendar-event-popover-link svg {
    width: 12px;
    height: 12px;
}

.calendar-related-picker {
    position: relative;
}

.calendar-related-picker .reminder-related-results {
    top: 60px;
}

.calendar-modal-body .flash-message {
    margin-bottom: 12px;
}


/* =========================================================
   INBOX - live data
   ========================================================= */

a.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inbox-message-icon.task,
.inbox-type.task,
.inbox-detail-type.task {
    color: #198754;
    background: #e9f6ef;
}

.inbox-detail-type.alert {
    color: #b77900;
    background: #fff4d6;
}

.inbox-detail-type.expired {
    color: #bf2532;
    background: #fcebed;
}

.inbox-detail-type.system {
    color: #1686a7;
    background: #e8f7fc;
}

.inbox-status.in-app {
    color: #555b64;
    background: #f1f2f4;
}

.inbox-primary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.inbox-row {
    cursor: pointer;
}

.inbox-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.inbox-detail-actions a {
    text-decoration: none;
}


/* =========================================================
   EXPLORER - live data
   ========================================================= */

a.explorer-add-btn,
a.explorer-filter-btn,
a.explorer-folder-card {
    text-decoration: none;
}

a.explorer-folder-card {
    color: inherit;
}

.explorer-clear-btn {
    color: #555b64;
    background: #ffffff;
    border-color: #dedede;
}

.explorer-item-link {
    color: inherit;
    text-decoration: none;
}

.explorer-item-link:hover {
    color: #bf2532;
    text-decoration: underline;
}

.explorer-status.overdue,
.explorer-detail-status.overdue {
    color: #bf2532;
    background: #fcebed;
}

.explorer-status.completed,
.explorer-status.active,
.explorer-detail-status.completed,
.explorer-detail-status.active {
    color: #198754;
    background: #e9f6ef;
}

.explorer-status.no_expiry,
.explorer-status.inactive,
.explorer-detail-status.no_expiry,
.explorer-detail-status.inactive {
    color: #555b64;
    background: #f1f2f4;
}

.explorer-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 17px 17px;
}

.explorer-detail-actions .explorer-filter-btn {
    color: #555b64;
    background: #ffffff;
    border-color: #dedede;
}

.explorer-detail-actions .explorer-filter-btn:hover {
    color: #bf2532;
    background: #fff7f8;
    border-color: #efc8cc;
}


/* Dashboard live links */
a.attention-item,
a.dashboard-calendar-event {
    color: inherit;
    text-decoration: none;
}

a.dashboard-calendar-event {
    white-space: nowrap;
    text-overflow: ellipsis;
}

a.dashboard-calendar-event.expiration { color: #a91f2b; }
a.dashboard-calendar-event.reminder { color: #a66b00; }
a.dashboard-calendar-event.event { color: #5647b7; }
a.dashboard-calendar-event.birthday { color: #17744b; }
a.dashboard-calendar-event.appointment { color: #16789a; }

a.attention-item:hover strong {
    color: #bf2532;
}


/* Subscription: current plan summary */
.subscription-current {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e4e7;
    border-radius: 9px;
}

.subscription-current > div {
    min-width: 0;
}

.subscription-current span {
    display: block;
    margin-bottom: 3px;
    color: #8a9099;
    font-size: 8px;
}

.subscription-current strong {
    color: #252525;
    font-size: 10px;
}

.subscription-current .subscription-status.active {
    color: #198754;
}

.subscription-current .subscription-status.trial {
    color: #b77900;
}

.subscription-current .subscription-status.expired,
.subscription-current .subscription-status.cancelled {
    color: #bf2532;
}

.subscription-plan-form {
    margin: 0;
}

.subscription-plan-btn:disabled {
    cursor: default;
    opacity: 0.6;
    transform: none;
}

@media (max-width: 768px) {
    .subscription-current {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   NOTIFICATION PROVIDERS
   ========================================================= */

.settings-provider-company {
    max-width: 320px;
}

.settings-provider-company select:disabled {
    color: #252525;
    background: #f7f8f9;
}

.settings-provider {
    display: grid;
    gap: 8px;
}

.settings-provider-status {
    font-style: normal;
    font-weight: 650;
}

.settings-provider-status.is-connected {
    color: #198754;
}

.settings-provider-status.is-verification_required {
    color: #b7791f;
}

.settings-provider-status.is-not_connected,
.settings-provider-status.is-disabled {
    color: #8a9099;
}

.settings-provider-btn {
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    color: #252525;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #dedede;
    border-radius: 7px;
    white-space: nowrap;
}

.settings-provider-btn:hover {
    border-color: #c9cdd2;
    background: #f7f8f9;
}

.settings-provider-btn.is-danger {
    color: #bf2532;
}

.settings-provider-panel {
    padding: 14px;
    background: #fbfbfc;
    border: 1px solid #e7e8ea;
    border-radius: 10px;
}

.settings-provider-advanced {
    margin-top: 12px;
}

.settings-provider-advanced summary {
    margin-bottom: 10px;
    color: #555b64;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
}

.settings-provider-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

/* =========================================================
   DOCUMENT SCAN (browser OCR)
   ========================================================= */

#uploadDocumentModal .document-upload-area.is-scanning #documentFileHint::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    vertical-align: -1px;
    border: 1.5px solid #e3c3c6;
    border-top-color: #bf2532;
    border-radius: 50%;
    animation: documentScanSpin 0.8s linear infinite;
}

@keyframes documentScanSpin {
    to {
        transform: rotate(360deg);
    }
}

#uploadDocumentModal .document-scan-filled {
    border-color: #198754 !important;
    background-color: #f3fbf6 !important;
}

/* Scan Review (document OCR suggestions) */

#uploadDocumentModal .document-scan-review {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 13px;
    padding: 12px;
    border: 1px solid #efe2e3;
    border-radius: 9px;
    background: #fffdfd;
}

#uploadDocumentModal .document-scan-review[hidden],
#uploadDocumentModal .document-scan-review [hidden] {
    display: none;
}

#uploadDocumentModal .document-scan-review-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

#uploadDocumentModal .document-scan-review-head strong {
    color: #404040;
    font-size: 10px;
    font-weight: 600;
}

#uploadDocumentModal .document-scan-review-head span,
#uploadDocumentModal .document-scan-details-head small,
#uploadDocumentModal .document-owner-missing span {
    color: #8a8a8a;
    font-size: 8px;
}

#uploadDocumentModal .document-owner-finder {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#uploadDocumentModal .document-owner-finder label,
#uploadDocumentModal .document-scan-details-head span {
    color: #454545;
    font-size: 9px;
    font-weight: 600;
}

#uploadDocumentModal .document-scan-review input {
    width: 100%;
    height: 32px;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid #e2e2e2;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 10px;
}

#uploadDocumentModal .document-scan-review input:focus {
    border-color: #dca3a8;
    box-shadow: 0 0 0 3px rgba(191, 37, 50, 0.06);
}

#uploadDocumentModal .document-owner-matches {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#uploadDocumentModal .document-owner-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    padding: 7px 10px;
    border: 1px solid #ececec;
    border-radius: 7px;
    background: #ffffff;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

#uploadDocumentModal .document-owner-match:hover {
    border-color: #dca3a8;
}

#uploadDocumentModal .document-owner-match.is-selected {
    border-color: #198754;
    background: #f3fbf6;
}

#uploadDocumentModal .document-owner-match strong {
    color: #333333;
    font-size: 10px;
    font-weight: 600;
}

#uploadDocumentModal .document-owner-match small {
    grid-column: 1;
    color: #8a8a8a;
    font-size: 8px;
}

#uploadDocumentModal .document-owner-match em {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: #bf2532;
    font-size: 8px;
    font-style: normal;
    font-weight: 600;
}

#uploadDocumentModal .document-owner-match.is-selected em {
    color: #198754;
}

#uploadDocumentModal .document-owner-missing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

#uploadDocumentModal .document-owner-missing a,
#uploadDocumentModal .document-owner-missing button,
#uploadDocumentModal .document-scan-notes-btn {
    padding: 0;
    border: 0;
    background: none;
    color: #bf2532;
    font-family: inherit;
    font-size: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

#uploadDocumentModal .document-company-check {
    margin: 0;
    color: #555555;
    font-size: 8px;
}

#uploadDocumentModal .document-company-check.is-warning {
    color: #b45309;
}

#uploadDocumentModal .document-scan-details-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}

#uploadDocumentModal .document-scan-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 6px;
}

#uploadDocumentModal .document-scan-details-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#uploadDocumentModal .document-scan-details-grid span {
    color: #8a8a8a;
    font-size: 8px;
}

#uploadDocumentModal .document-scan-checks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid #f1e3c8;
    border-radius: 7px;
    background: #fffbf3;
}

#uploadDocumentModal .document-scan-checks p {
    margin: 0;
    font-size: 9px;
}

#uploadDocumentModal .document-scan-checks-head {
    color: #b45309;
    font-weight: 600;
}

#uploadDocumentModal .document-scan-checks-head.is-ok {
    color: #198754;
}

#uploadDocumentModal .document-scan-check {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    color: #454545;
}

#uploadDocumentModal .document-scan-check strong {
    font-weight: 600;
}

#uploadDocumentModal .document-scan-check-state {
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 600;
}

#uploadDocumentModal .document-scan-check-state.is-not-detected {
    background: #fdecec;
    color: #b42318;
}

#uploadDocumentModal .document-scan-check-state.is-not-selected {
    background: #eef2f7;
    color: #44546a;
}

#uploadDocumentModal .document-scan-check-state.is-needs-confirmation {
    background: #fff1d6;
    color: #b45309;
}

#uploadDocumentModal .document-scan-check small,
#uploadDocumentModal .document-scan-check-note {
    color: #8a8a8a;
    font-size: 8px;
}

#uploadDocumentModal .document-validity-choice {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#uploadDocumentModal .document-validity-choice label {
    color: #b45309;
    font-size: 9px;
    font-weight: 600;
}

#uploadDocumentModal .document-validity-choice select {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e2e2e2;
    border-radius: 7px;
    background: #ffffff;
    color: #333333;
    font-family: inherit;
    font-size: 10px;
}

/* Add Employee opened from a document scan */

.employee-scan-note {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #cfe9da;
    border-radius: 9px;
    background: #f3fbf6;
    color: #3d3d3d;
    font-size: 11px;
    line-height: 1.45;
}

.employee-scan-note[hidden] {
    display: none;
}

.employee-scan-note p {
    margin: 0 0 4px;
}

.employee-scan-note p:last-child {
    margin-bottom: 0;
}

.employee-scan-note button,
.employee-scan-note a {
    margin-right: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: #bf2532;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.employee-form-group .employee-ocr-filled {
    border-color: #198754;
    background-color: #f3fbf6;
}


/* =========================================================
   DASHBOARD (HOME) - consistent sizes and card styles
   Scoped to .dashboard-home so pages reusing these classes are unchanged.
   ========================================================= */

.dashboard-home .dashboard-section-heading {
    margin: 22px 0 10px;
}

.dashboard-home .dashboard-section-heading h2 {
    font-size: 15px;
}

.dashboard-home .dashboard-section-heading p {
    font-size: 11px;
}

/* Hero */
.dashboard-home .expiresafe-hero {
    margin-bottom: 0;
}

.dashboard-home .hero-content h2 {
    font-size: 22px;
}

.dashboard-home .hero-content p {
    font-size: 12px;
}

.dashboard-home .hero-primary-btn,
.dashboard-home .hero-secondary-btn {
    min-height: 36px;
    padding: 0 14px;
    font-size: 12px;
}

.dashboard-home .hero-primary-btn span {
    font-size: 12px;
}

.dashboard-home .hero-primary-btn svg,
.dashboard-home .hero-secondary-btn svg {
    width: 15px;
    height: 15px;
}

.dashboard-home .hero-mini-card strong {
    font-size: 14px;
    line-height: 1.1;
}

.dashboard-home .hero-mini-card small {
    font-size: 10px;
}

.dashboard-home .hero-mini-icon svg {
    width: 14px;
    height: 14px;
}

/* Quick actions: six equal tiles */
.dashboard-home .quick-actions-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-home .quick-action {
    min-height: 64px;
    padding: 11px 12px;
    color: inherit;
    text-decoration: none;
}

.dashboard-home .quick-action strong {
    font-size: 13px;
}

.dashboard-home .quick-action small {
    font-size: 11px;
}

.dashboard-home .quick-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.dashboard-home .quick-icon svg {
    width: 17px;
    height: 17px;
}

.dashboard-home .quick-icon.purple {
    background: var(--purple-soft);
    color: var(--purple);
}

.dashboard-home .quick-icon.teal {
    background: var(--teal-soft);
    color: var(--teal);
}

.dashboard-home .quick-arrow {
    display: none;
}

/* Document overview: one white card style, colour only on the icon, top edge and number */
.dashboard-home .summary-grid {
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard-home .summary-card {
    --card-color: var(--text);
    --card-soft: #f1f2f4;

    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    overflow: visible;
    padding: 14px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text);
}

.dashboard-home .summary-card .summary-description {
    margin-top: auto;
}

.dashboard-home .summary-card .summary-icon-wrap {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    margin-bottom: 10px;
    background: var(--card-soft);
    color: var(--card-color);
}

.dashboard-home .summary-icon-wrap svg {
    width: 17px;
    height: 17px;
}

.dashboard-home .summary-label {
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
}

.dashboard-home .summary-number {
    color: var(--card-color);
    font-size: 26px;
}

.dashboard-home .summary-description {
    padding-top: 8px;
    color: var(--text-muted);
    font-size: 11px;
    opacity: 1;
}

.dashboard-home .mini-progress {
    height: 5px;
    margin-top: 8px;
    background: var(--card-soft);
}

.dashboard-home .expired-card    { --card-color: var(--primary); --card-soft: var(--primary-soft); }
.dashboard-home .compliance-card { --card-color: var(--success); --card-soft: var(--success-soft); }
.dashboard-home .pending-card    { --card-color: #b07700;        --card-soft: var(--accent-soft); }
.dashboard-home .weeks-card      { --card-color: #d97f00;        --card-soft: #fff1dc; }
.dashboard-home .months-card     { --card-color: var(--teal);    --card-soft: var(--teal-soft); }
.dashboard-home .completed-card  { --card-color: var(--purple);  --card-soft: var(--purple-soft); }
.dashboard-home .total-card      { --card-color: #4f5bd5;        --card-soft: #eceefc; }

/* Status row: label on the left, number on the right */
.dashboard-home .status-grid {
    gap: 12px;
    margin-bottom: 22px;
}

.dashboard-home .status-card {
    min-height: 64px;
    padding: 12px 16px;
}

.dashboard-home .status-left {
    gap: 12px;
}

.dashboard-home .status-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.dashboard-home .status-icon svg {
    width: 17px;
    height: 17px;
}

.dashboard-home .status-left strong {
    font-size: 13px;
}

.dashboard-home .status-left small {
    font-size: 11px;
}

.dashboard-home .status-number {
    font-size: 22px;
}

/* Calendar and attention panels */
.dashboard-home .dashboard-content-grid {
    gap: 16px;
}

.dashboard-home .panel-header {
    padding: 14px 16px;
}

.dashboard-home .panel-header h2 {
    font-size: 15px;
}

.dashboard-home .panel-header p {
    font-size: 11px;
}

.dashboard-home .panel-header > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.dashboard-home .panel-header > a svg {
    width: 14px;
    height: 14px;
}

.dashboard-home .dashboard-calendar-toolbar {
    margin: 14px 16px 12px;
}

.dashboard-home .dashboard-mini-calendar {
    margin: 0 16px 16px;
}

.dashboard-home .dashboard-calendar-weekday {
    font-size: 10px;
}

.dashboard-home .dashboard-calendar-date {
    font-size: 11px;
}

.dashboard-home .dashboard-calendar-event {
    font-size: 10px;
}

.dashboard-home .attention-list {
    padding: 0 16px;
}

.dashboard-home .attention-item {
    gap: 12px;
    padding: 12px 0;
    color: inherit;
    text-decoration: none;
}

.dashboard-home .attention-item:last-child {
    border-bottom: 0;
}

.dashboard-home .attention-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.dashboard-home .attention-icon svg {
    width: 17px;
    height: 17px;
}

.dashboard-home .attention-icon.danger,
.dashboard-home .date-badge.danger {
    background: var(--primary-soft);
    color: var(--primary);
}

.dashboard-home .attention-icon.warning,
.dashboard-home .date-badge.warning {
    background: var(--accent-soft);
    color: #966300;
}

.dashboard-home .attention-icon.info,
.dashboard-home .date-badge.info {
    background: var(--info-soft);
    color: var(--info);
}

.dashboard-home .attention-icon.safe {
    background: var(--success-soft);
    color: var(--success);
}

.dashboard-home .attention-item-main strong {
    font-size: 13px;
}

.dashboard-home .attention-item-main div > span {
    font-size: 11px;
}

.dashboard-home .attention-date strong {
    color: var(--text);
    font-size: 13px;
}

.dashboard-home .date-badge {
    padding: 3px 8px;
    font-size: 10px;
}

@media (max-width: 1280px) {
    .dashboard-home .quick-actions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-home .summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-home .quick-actions-grid,
    .dashboard-home .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .dashboard-home .quick-actions-grid,
    .dashboard-home .summary-grid {
        grid-template-columns: 1fr;
    }
}
