:root {
    --bg-main: #050506;
    --bg-secondary: #0F0B14;
    --card: #151515;
    --card-hover: #1B1B1B;
    --orange: #FD7A00;
    --orange-hover: #FF9833;
    --purple: #6D3BFF;
    --purple-dark: #34105D;
    --white: #F7F6F7;
    --gray: #B8B8B8;
    --green: #22C55E;
    --red: #EF4444;
    --yellow: #FACC15;
    --bg-dark: var(--bg-main);
    --dark-purple: var(--purple-dark);
    --primary-purple: var(--purple);
    --accent-yellow: var(--orange);
    --text-white: var(--white);
    --text-gray: var(--gray);
    --line: rgba(247, 246, 247, 0.1);
    --line-strong: rgba(247, 246, 247, 0.16);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-strong: rgba(255, 255, 255, 0.065);
    --shadow-orange: rgba(253, 122, 0, 0.25);
    --shadow-purple: rgba(109, 59, 255, 0.24);
    --radius: 14px;
    --sidebar-width: 258px;
    --sidebar-collapsed-width: 74px;
    --current-sidebar-width: var(--sidebar-width);
}

body.sidebar-collapsed,
html.sidebar-collapsed-preload body {
    --current-sidebar-width: var(--sidebar-collapsed-width);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(247, 246, 247, 0.12);
    border-radius: 4px;
    border: 2px solid var(--bg-main);
    transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

::selection {
    background: var(--purple);
    color: var(--white);
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg-main);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--white);
    font-family: 'Sora', 'Outfit', Arial, sans-serif;
    background:
        radial-gradient(circle at 12% 0%, rgba(109, 59, 255, 0.28), transparent 34rem),
        radial-gradient(circle at 88% 18%, rgba(253, 122, 0, 0.16), transparent 32rem),
        linear-gradient(135deg, var(--bg-main), var(--bg-secondary) 68%, #08050b);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(247, 246, 247, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247, 246, 247, 0.026) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
}

a {
    color: inherit;
}

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

body:not(.dashboard-body) {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-container {
    width: min(100%, 470px);
}

.login-card {
    position: relative;
    width: 100%;
    padding: 42px;
    text-align: center;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025)),
        rgba(15, 11, 20, 0.76);
    box-shadow: 0 34px 120px rgba(0, 0, 0, 0.48), 0 0 80px rgba(109, 59, 255, 0.16);
    backdrop-filter: blur(22px);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    border-color: rgba(253, 122, 0, 0.3);
    box-shadow: 0 34px 120px rgba(0, 0, 0, 0.55), 0 0 80px rgba(109, 59, 255, 0.22);
}

.login-card::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    right: -90px;
    top: -90px;
    border-radius: 999px;
    background: var(--orange);
    filter: blur(90px);
    opacity: 0.26;
}

.logo {
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
    color: var(--white);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0;
}

.logo span {
    color: var(--orange);
}

.login-card h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 26px;
    color: var(--gray);
    font-size: 1rem;
    font-weight: 600;
}

.input-group {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
    text-align: left;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--orange);
    transition: transform 0.2s ease, color 0.2s ease;
}

.input-group input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    color: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: rgba(5, 5, 6, 0.56);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-group input:focus {
    border-color: var(--orange);
    background: rgba(5, 5, 6, 0.74);
    box-shadow: 0 0 0 4px rgba(253, 122, 0, 0.12), 0 0 30px rgba(253, 122, 0, 0.16);
}

.input-group input:focus + i {
    color: var(--orange-hover);
    transform: translateY(-50%) scale(1.1);
}

.btn-login {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 52px;
    color: #160904;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), #FD5200);
    box-shadow: 0 18px 42px rgba(253, 122, 0, 0.26);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 24px 60px rgba(253, 122, 0, 0.38);
}

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

.error-msg {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
    padding: 12px;
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
}

.back-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 20px;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
    color: var(--white);
    transform: translateY(-1px);
}

/* Dashboard Shell */
body.dashboard-body {
    display: block;
    padding: 0;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    width: var(--current-sidebar-width);
    height: 100vh;
    min-height: 0;
    padding: 16px 12px;
    border-right: 1px solid var(--line);
    background:
        radial-gradient(circle at 0% 0%, rgba(109, 59, 255, 0.2), transparent 20rem),
        rgba(5, 5, 6, 0.88);
    backdrop-filter: blur(22px);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 0 0 auto;
    padding: 6px 4px 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #160904;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--orange), var(--orange-hover));
    box-shadow: 0 16px 38px var(--shadow-orange);
    font-weight: 800;
    flex: 0 0 auto;
}

.brand-copy {
    display: grid;
    gap: 2px;
    white-space: nowrap;
}

.brand-copy strong {
    color: var(--white);
    font-size: 1.03rem;
    letter-spacing: 0;
}

.brand-copy span {
    color: var(--gray);
    font-size: 0.78rem;
}

.sidebar-collapse-toggle {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--gray);
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.sidebar-collapse-toggle:hover {
    background: rgba(253, 122, 0, 0.18);
    color: var(--orange);
    border-color: rgba(253, 122, 0, 0.4);
    transform: scale(1.05);
}

body.sidebar-collapsed .sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 0 16px;
    position: relative;
}

body.sidebar-collapsed .brand-left {
    justify-content: center;
    width: 100%;
    margin: 0;
}

body.sidebar-collapsed .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    margin: 0 auto;
    font-size: 0.95rem;
}

body.sidebar-collapsed .sidebar-collapse-toggle {
    position: relative !important;
    inset: auto !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    background: rgba(253, 122, 0, 0.15) !important;
    border: 1px solid rgba(253, 122, 0, 0.3) !important;
    color: var(--orange) !important;
    margin: 0 auto !important;
}

body.sidebar-collapsed .sidebar-collapse-toggle:hover {
    background: var(--orange) !important;
    color: #0c0814 !important;
    transform: scale(1.08) !important;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-menu .title,
body.sidebar-collapsed .user-meta {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.sidebar-collapsed .sidebar-collapse-toggle i {
    transform: rotate(180deg);
}

/* Collapsed Menu Buttons */
body.sidebar-collapsed .sidebar-menu {
    align-items: center;
    padding: 8px 0;
    gap: 8px;
}

body.sidebar-collapsed .sidebar-menu li {
    width: 100%;
    display: flex;
    justify-content: center;
}

body.sidebar-collapsed .sidebar-menu a {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0 auto;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.sidebar-collapsed .sidebar-menu a::before {
    display: none;
}

body.sidebar-collapsed .sidebar-menu .icon {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    background: transparent;
    font-size: 1.15rem;
    color: var(--gray);
    display: grid;
    place-items: center;
    transition: all 0.25s ease;
}

body.sidebar-collapsed .sidebar-menu a:hover:not(.active) {
    background: rgba(253, 122, 0, 0.15);
    border-color: rgba(253, 122, 0, 0.35);
    transform: scale(1.06);
}

body.sidebar-collapsed .sidebar-menu a:hover:not(.active) .icon {
    color: var(--orange);
}

body.sidebar-collapsed .sidebar-menu a.active {
    background: linear-gradient(135deg, #fd7a00, #ff4757);
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(253, 122, 0, 0.45);
    transform: scale(1.08);
}

body.sidebar-collapsed .sidebar-menu a.active .icon {
    color: #fff;
    background: transparent;
    transform: none;
}

/* Tooltip on hover when collapsed */
body.sidebar-collapsed .sidebar-menu a {
    position: relative;
}

body.sidebar-collapsed .sidebar-menu a:hover::after {
    content: attr(title);
    position: absolute;
    left: 56px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(18, 13, 28, 0.95);
    border: 1px solid rgba(253, 122, 0, 0.35);
    color: #fff;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 9999;
    animation: fadeInTooltip 0.15s ease forwards;
}

@keyframes fadeInTooltip {
    from { opacity: 0; transform: translateY(-50%) translateX(-6px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* Collapsed Footer */
body.sidebar-collapsed .sidebar-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 10px auto;
    border-radius: 14px;
    background: rgba(253, 122, 0, 0.08);
    border: 1px solid rgba(253, 122, 0, 0.25);
}

body.sidebar-collapsed .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

body.sidebar-collapsed .logout-btn {
    display: none;
}

.sidebar-menu {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-height: 0;
    padding: 6px 2px 12px;
    margin: 0;
    list-style: none;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-menu::-webkit-scrollbar {
    display: none;
}

.sidebar-section-title {
    padding: 12px 10px 5px;
    color: rgba(247, 246, 247, 0.4);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.sidebar-section-title:first-child {
    padding-top: 6px;
}

.sidebar-menu a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 39px;
    padding: 0 9px;
    color: rgba(247, 246, 247, 0.72);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 99px;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    left: -14px;
    width: 3px;
    height: 20px;
    border-radius: 0 8px 8px 0;
    background: var(--orange);
    opacity: 0;
    transform: scaleY(0.35);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: var(--white);
    border-color: rgba(253, 122, 0, 0.25);
    background: linear-gradient(135deg, rgba(253, 122, 0, 0.14), rgba(109, 59, 255, 0.08));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24), 0 0 34px rgba(253, 122, 0, 0.08);
    transform: translateX(2px);
}

.sidebar-menu a:hover::before,
.sidebar-menu a.active::before {
    opacity: 1;
    transform: scaleY(1);
}

.sidebar-menu .icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    color: var(--orange);
    border-radius: 8px;
    background: rgba(253, 122, 0, 0.08);
    flex: 0 0 auto;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.sidebar-menu a:hover .icon,
.sidebar-menu a.active .icon {
    transform: scale(1.08) rotate(5deg);
    background: rgba(253, 122, 0, 0.14);
    color: var(--orange-hover);
}

.sidebar-menu .title {
    font-size: 0.81rem;
    font-weight: 650;
    white-space: nowrap;
}

.sidebar-footer {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 38px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--white);
    border: 1px solid rgba(253, 122, 0, 0.24);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(253, 122, 0, 0.28), rgba(109, 59, 255, 0.18));
    font-weight: 800;
}

.user-meta {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.user-meta strong,
.user-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta strong {
    font-size: 0.88rem;
}

.user-meta span {
    color: var(--gray);
    font-size: 0.74rem;
}

.logout-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--red);
    text-decoration: none;
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 11px;
    background: rgba(239, 68, 68, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    background: rgba(239, 68, 68, 0.14);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.18);
}

.sidebar-toggle,
.sidebar-backdrop {
    display: none;
}

.main-content {
    width: calc(100% - var(--current-sidebar-width));
    min-height: 100vh;
    margin-left: var(--current-sidebar-width);
    padding: 24px clamp(20px, 3.5vw, 42px) 36px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-topbar,
.main-content > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--line);
}

.topbar-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topbar-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--orange);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.admin-topbar h1 {
    margin: 4px 0 2px;
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--white);
}

.topbar-subtitle {
    margin: 3px 0 0;
    color: var(--gray);
    font-size: 0.86rem;
    line-height: 1.4;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-action-btn {
    margin-top: 0 !important;
    padding: 10px 18px !important;
    height: auto !important;
    font-size: 0.88rem !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 11px;
    box-shadow: 0 8px 20px rgba(253, 122, 0, 0.22);
}

.topbar-action-btn.btn-green {
    background: #25d366 !important;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.22);
}

.topbar-action-btn.btn-red {
    background: #ff4757 !important;
    box-shadow: 0 8px 20px rgba(255, 71, 87, 0.22);
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 16px;
    color: var(--white);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-weight: 700;
    font-size: 0.85rem;
}

.user-badge i {
    color: var(--orange);
}

.content-wrapper {
    animation: slideUp 0.5s ease both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        margin-top: 18px;
    }
    to {
        opacity: 1;
        margin-top: 0;
    }
}

.saas-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px 16px;
    color: #170904;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--orange), var(--orange-hover));
    box-shadow: 0 18px 46px var(--shadow-orange);
    font-weight: 800;
}

/* Cards, Hero and Dashboard */
.welcome-card,
.admin-section,
.metric-card,
.report-list-btn,
.kanban-column,
.kanban-card,
.contract-item {
    border: 1px solid var(--line);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.022)),
        var(--glass);
    backdrop-filter: blur(18px);
}

.welcome-card {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    margin-bottom: 24px;
    padding: clamp(26px, 4vw, 46px);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.welcome-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    background:
        radial-gradient(circle at 14% 20%, rgba(253, 122, 0, 0.22), transparent 20rem),
        radial-gradient(circle at 88% 12%, rgba(109, 59, 255, 0.24), transparent 26rem);
    pointer-events: none;
}

.welcome-card > * {
    position: relative;
    z-index: 1;
}

.hero-label {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--orange);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.welcome-card h2 {
    margin: 0;
    color: var(--white);
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.02;
}

.welcome-card p {
    max-width: 680px;
    margin: 14px 0 0;
    color: var(--gray);
    line-height: 1.75;
}

.hero-orbit {
    position: relative;
    width: 178px;
    height: 178px;
    flex: 0 0 auto;
    border: 1px solid rgba(247, 246, 247, 0.12);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(253, 122, 0, 0.18), rgba(109, 59, 255, 0.1) 46%, transparent 68%);
}

.hero-orbit span {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(247, 246, 247, 0.12);
}

.hero-orbit span:first-child {
    inset: 18px;
}

.hero-orbit span:nth-child(2) {
    inset: 46px;
    background: rgba(253, 122, 0, 0.16);
}

.hero-orbit span:nth-child(3) {
    width: 12px;
    height: 12px;
    right: 32px;
    top: 42px;
    border: 0;
    background: var(--orange);
    box-shadow: 0 0 24px var(--orange);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    position: relative;
    min-height: 178px;
    padding: 22px;
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.metric-card:hover,
.admin-section:hover {
    border-color: rgba(253, 122, 0, 0.24);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.032)),
        var(--card-hover);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24), 0 0 42px rgba(253, 122, 0, 0.07);
}

.metric-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.metric-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    color: var(--orange);
    border-radius: 12px;
    background: rgba(253, 122, 0, 0.1);
}

.metric-card span {
    display: block;
    color: var(--gray);
    font-size: 0.88rem;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    color: var(--white);
    font-size: clamp(1.65rem, 2.5vw, 2.25rem);
    line-height: 1;
}

.metric-card small {
    display: block;
    margin-top: 14px;
    color: rgba(184, 184, 184, 0.72);
}

.metric-card.revenue .metric-icon,
.report-list-btn.finance i {
    color: var(--green);
    background: rgba(34, 197, 94, 0.1);
}

.metric-card.expense .metric-icon {
    color: var(--red);
    background: rgba(239, 68, 68, 0.1);
}

.metric-card.clients .metric-icon {
    color: var(--purple);
    background: rgba(109, 59, 255, 0.12);
}

.metric-card.projects .metric-icon {
    color: var(--yellow);
    background: rgba(250, 204, 21, 0.1);
}

.charts-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr 0.9fr;
    gap: 16px;
    margin-bottom: 24px;
}

.chart-panel {
    min-height: 310px;
}

.line-chart-faux,
.bar-chart-faux {
    position: relative;
    height: 210px;
    margin-top: 26px;
    border-radius: 16px;
    background:
        linear-gradient(rgba(247, 246, 247, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247, 246, 247, 0.045) 1px, transparent 1px);
    background-size: 100% 25%, 18% 100%;
    overflow: hidden;
}

.line-chart-faux::before {
    content: '';
    position: absolute;
    inset: 32px 22px 34px;
    background: linear-gradient(135deg, transparent 6%, var(--orange) 6% 9%, transparent 9% 30%, var(--purple) 30% 33%, transparent 33% 52%, var(--orange) 52% 55%, transparent 55% 73%, var(--green) 73% 76%, transparent 76%);
    filter: drop-shadow(0 0 16px rgba(253, 122, 0, 0.35));
}

.line-chart-faux span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 0 18px var(--orange);
}

.line-chart-faux span:nth-child(1) { left: 9%; bottom: 29%; }
.line-chart-faux span:nth-child(2) { left: 29%; bottom: 56%; background: var(--purple); }
.line-chart-faux span:nth-child(3) { left: 49%; bottom: 42%; }
.line-chart-faux span:nth-child(4) { left: 69%; bottom: 72%; background: var(--green); }
.line-chart-faux span:nth-child(5) { left: 88%; bottom: 58%; }

.pie-chart-faux {
    width: 176px;
    height: 176px;
    margin: 28px auto 20px;
    border-radius: 999px;
    background: conic-gradient(var(--orange) 0deg var(--p1), var(--purple) var(--p1) 270deg, var(--green) 270deg 360deg);
    box-shadow: 0 0 50px rgba(109, 59, 255, 0.2);
}

.pie-chart-faux::after {
    content: '';
    display: block;
    width: 96px;
    height: 96px;
    transform: translate(40px, 40px);
    border-radius: 999px;
    background: var(--bg-secondary);
}

.chart-legend {
    display: grid;
    gap: 9px;
    color: var(--gray);
    font-size: 0.88rem;
}

.dot {
    display: inline-flex;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    border-radius: 999px;
}

.dot.orange { background: var(--orange); }
.dot.purple { background: var(--purple); }
.dot.green { background: var(--green); }

.bar-chart-faux {
    display: flex;
    align-items: end;
    gap: 13px;
    padding: 24px 18px 0;
}

.bar-chart-faux span {
    flex: 1;
    min-width: 0;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, var(--orange), var(--purple));
    box-shadow: 0 0 28px rgba(109, 59, 255, 0.22);
}

.dashboard-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    gap: 18px;
    align-items: start;
}

/* Sections, Forms and Tables */
.admin-section {
    padding: 24px;
    margin-bottom: 22px;
    border-radius: 18px;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.admin-section h3,
.modal-content h3 {
    margin: 0 0 20px;
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 800;
}

.admin-section h3 i,
.modal-content h3 i {
    color: var(--orange);
    margin-right: 8px;
}

.admin-form {
    display: grid;
    gap: 16px;
    width: 100%;
    max-width: 720px;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.search-box,
.custom-select,
input,
textarea,
select {
    color: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: rgba(5, 5, 6, 0.56);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
input,
textarea,
select {
    padding: 13px 14px;
}

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

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.search-box:focus,
.custom-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--orange);
    background: rgba(5, 5, 6, 0.8);
    box-shadow: 0 0 0 4px rgba(253, 122, 0, 0.14), 0 0 30px rgba(253, 122, 0, 0.18);
}

::placeholder {
    color: rgba(184, 184, 184, 0.72);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.btn-save,
.btn-login,
.btn-action,
.btn-cancel,
.report-list-btn,
.tab-btn,
.btn-move {
    position: relative;
    overflow: hidden;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 17px;
    color: #170904;
    text-decoration: none;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), #FD5200);
    box-shadow: 0 15px 36px rgba(253, 122, 0, 0.22);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-save:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.06);
    box-shadow: 0 22px 50px rgba(253, 122, 0, 0.42);
}

.btn-save:active {
    transform: translateY(0) scale(0.98);
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 15px;
    color: var(--gray);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-cancel:hover {
    color: var(--white);
    border-color: rgba(247, 246, 247, 0.22);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px) scale(1.02);
}

.btn-cancel:active {
    transform: translateY(0) scale(0.98);
}

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

.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    border-spacing: 0;
}

.data-table th {
    padding: 14px 16px;
    color: rgba(247, 246, 247, 0.62);
    text-align: left;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}

.data-table td {
    padding: 16px;
    color: rgba(247, 246, 247, 0.84);
    border-bottom: 1px solid rgba(247, 246, 247, 0.065);
    transition: background 0.25s ease, color 0.25s ease;
}

.data-table tbody tr:hover td {
    color: var(--white);
    background: rgba(253, 122, 0, 0.04);
}

.thumb-img {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.search-box {
    width: min(100%, 290px);
    height: 42px;
    padding: 0 14px 0 36px;
}

.status-badge,
.badge-priority {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-active {
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.1);
}

.status-inactive {
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.1);
}

.btn-action {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 2px;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-action:hover {
    transform: translateY(-2px) scale(1.05);
}

.btn-action:active {
    transform: translateY(0) scale(0.95);
}

.btn-view { color: var(--white); }
.btn-view:hover { background: rgba(253, 122, 0, 0.14); color: var(--orange); box-shadow: 0 12px 28px rgba(253, 122, 0, 0.16); }
.btn-edit { color: #c4b5fd; }
.btn-edit:hover { background: rgba(109, 59, 255, 0.16); color: #ddd6fe; box-shadow: 0 12px 28px rgba(109, 59, 255, 0.18); }
.btn-delete,
.btn-icon-delete { color: #fca5a5; }
.btn-delete:hover,
.btn-icon-delete:hover { background: rgba(239, 68, 68, 0.14); color: #fecaca; box-shadow: 0 12px 28px rgba(239, 68, 68, 0.18); }
.btn-activate { color: #86efac; }
.btn-activate:hover { background: rgba(34, 197, 94, 0.14); color: #bbf7d0; box-shadow: 0 12px 28px rgba(34, 197, 94, 0.18); }

.license-actions-list {
    display: inline-flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.license-actions-list .btn-action {
    width: 36px;
    height: 36px;
    margin: 0;
}

/* License management */
.licenses-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.licenses-new-button {
    flex: 0 0 auto;
}

.licenses-table-card {
    padding: 10px;
}

.licenses-page .data-table {
    min-width: 1280px;
}

.licenses-page .data-table tbody tr {
    transition: background 0.2s ease;
}

.licenses-page .data-table td {
    vertical-align: middle;
}

.licenses-page .license-actions-heading,
.licenses-page .license-actions-cell {
    width: 262px;
    min-width: 262px;
    text-align: right;
}

.licenses-page .license-actions-heading {
    padding-right: 18px;
}

.licenses-page .license-actions-cell {
    padding-right: 18px;
}

.licenses-page .license-actions-list .btn-action {
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.licenses-page .license-actions-list .btn-action i {
    font-size: 0.82rem;
}

.licenses-page .license-action-pause { color: #facc15; }
.licenses-page .license-action-pause:hover { color: #fde047; background: rgba(250, 204, 21, 0.13); box-shadow: 0 12px 28px rgba(250, 204, 21, 0.14); }
.licenses-page .license-action-edit { color: #74b9ff; }
.licenses-page .license-action-edit:hover { color: #bae6fd; background: rgba(56, 189, 248, 0.14); box-shadow: 0 12px 28px rgba(56, 189, 248, 0.16); }
.licenses-page .license-action-view { color: #f8fafc; }
.licenses-page .license-action-view:hover { color: #ffffff; background: rgba(255, 255, 255, 0.11); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2); }
.licenses-page .license-action-pix { color: #4ade80; }
.licenses-page .license-action-pix:hover { color: #86efac; background: rgba(34, 197, 94, 0.14); box-shadow: 0 12px 28px rgba(34, 197, 94, 0.16); }
.licenses-page .license-action-renew { color: #c4b5fd; }
.licenses-page .license-action-renew:hover { color: #ddd6fe; background: rgba(139, 92, 246, 0.16); box-shadow: 0 12px 28px rgba(109, 59, 255, 0.18); }

@media (max-width: 1100px) {
    .licenses-page .license-actions-heading,
    .licenses-page .license-actions-cell {
        width: 100%;
        min-width: 0;
    }

    .licenses-page .license-actions-list {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .licenses-page-header {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        margin-bottom: 22px;
    }

    .licenses-new-button {
        width: 100%;
    }

    .licenses-table-card {
        padding: 8px;
    }

    .licenses-page .license-actions-list {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }

    .licenses-page .license-actions-list .btn-action {
        flex: 1 0 36px;
        max-width: 44px;
        width: 40px;
        height: 40px;
    }
}

span.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.62s linear;
    background-color: rgba(255, 255, 255, 0.36);
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Kanban */
.kanban-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.custom-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.select-icon-left,
.select-icon-right {
    position: absolute;
    pointer-events: none;
}

.select-icon-left {
    left: 15px;
    color: var(--orange);
}

.select-icon-right {
    right: 15px;
    color: var(--gray);
    font-size: 0.78rem;
}

.custom-select {
    min-width: 230px;
    height: 44px;
    padding: 0 42px;
    appearance: none;
}

.custom-select option,
select option {
    color: var(--white);
    background: var(--bg-secondary);
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 18px;
    align-items: start;
}

.kanban-column {
    min-height: 430px;
    border-radius: 18px;
    overflow: hidden;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    color: var(--white);
    border-bottom: 1px solid var(--line);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-todo { border-top: 3px solid var(--red); }
.header-doing { border-top: 3px solid var(--yellow); }
.header-done { border-top: 3px solid var(--green); }

.column-header .count {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    color: var(--white);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.column-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 600px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding: 16px;
}

.column-body::-webkit-scrollbar {
    width: 6px;
}
.column-body::-webkit-scrollbar-track {
    background: transparent;
}
.column-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.column-body::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

.column-body.drag-over {
    outline: 1px dashed var(--orange);
    outline-offset: -8px;
    background: rgba(253, 122, 0, 0.055);
}

.kanban-card {
    padding: 16px;
    border-radius: 16px;
    cursor: grab;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.kanban-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(253, 122, 0, 0.35);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32), 0 0 30px rgba(109, 59, 255, 0.1);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.badge-priority.alta { color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.28); background: rgba(239, 68, 68, 0.1); }
.badge-priority.media { color: #fde68a; border: 1px solid rgba(250, 204, 21, 0.28); background: rgba(250, 204, 21, 0.1); }
.badge-priority.baixa { color: #bbf7d0; border: 1px solid rgba(34, 197, 94, 0.28); background: rgba(34, 197, 94, 0.1); }

.kanban-card h4 {
    margin: 0 0 7px;
    color: var(--white);
}

.kanban-card p {
    margin: 0 0 14px;
    color: var(--gray);
    font-size: 0.86rem;
    line-height: 1.55;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.btn-move {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-move:hover {
    transform: translateY(-2px);
    background: rgba(109, 59, 255, 0.22);
}

/* Modals, Tabs and Contracts */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 4, 5, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.modal-content {
    position: relative;
    width: min(92%, 680px);
    max-height: 88vh;
    padding: 0 !important;
    border-radius: 24px;
    border: 1px solid rgba(253, 122, 0, 0.25);
    background:
        radial-gradient(circle at 100% 0%, rgba(109, 59, 255, 0.22), transparent 26rem),
        radial-gradient(circle at 0% 100%, rgba(253, 122, 0, 0.16), transparent 24rem),
        linear-gradient(170deg, #140f21, #0a0711 70%);
    box-shadow: 
        0 38px 120px rgba(0, 0, 0, 0.82), 
        0 0 80px rgba(109, 59, 255, 0.18);
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(24px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--gray);
    border-radius: 11px;
    cursor: pointer;
    font-size: 1.6rem;
    transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.close-modal:hover {
    color: var(--white);
    background: var(--orange);
    transform: scale(1.05) rotate(90deg);
}

.tab-header {
    display: flex;
    gap: 8px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.tab-btn {
    flex: 1;
    min-height: 40px;
    color: var(--gray);
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
    transition: color 0.2s ease, background 0.2s ease;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--white);
    background: rgba(253, 122, 0, 0.12);
}

.tab-content {
    display: none;
    color: var(--gray);
    line-height: 1.7;
}

.tab-content.active {
    display: block;
}

.contract-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 14px;
}

.modal-notification-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-icon {
    margin-bottom: 18px;
    font-size: 3.4rem;
}

.modal-icon.success { color: var(--green); }
.modal-icon.error { color: var(--red); }
.modal-title { margin: 0 0 10px; color: var(--white); }
.modal-message { color: var(--gray); line-height: 1.65; }

/* Reports */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.report-card,
.report-list-btn {
    text-decoration: none;
}

.reports-list {
    display: grid;
    gap: 12px;
}

.report-list-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 14px 16px;
    color: var(--white);
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.report-list-btn:hover {
    transform: translateX(4px);
    border-color: rgba(253, 122, 0, 0.24);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.report-list-btn i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
}

.report-list-btn.clients { color: #ddd6fe; }
.report-list-btn.demands { color: #fecaca; }
.report-list-btn.projects { color: #fde68a; }
.report-list-btn.backup { color: #bfdbfe; }

/* Finance Chart */
canvas {
    max-width: 100%;
}

/* Legacy dropdown compatibility */
.dropdown-container,
.submenu {
    display: contents;
}

/* Responsive */
@media (max-width: 1240px) {
    .metric-grid,
    .charts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 980px) {
    :root {
        --sidebar-width: 286px;
    }

    .sidebar-toggle {
        position: fixed;
        top: 18px;
        left: 18px;
        z-index: 1100;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        color: var(--white);
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(5, 5, 6, 0.78);
        backdrop-filter: blur(12px);
        cursor: pointer;
    }

    .sidebar-collapse-toggle {
        display: none !important;
    }

    .sidebar {
        width: 286px !important;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
    }

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

    body.sidebar-collapsed .sidebar {
        width: 286px !important;
    }

    body.sidebar-collapsed .sidebar-brand {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 6px 4px 16px !important;
    }

    body.sidebar-collapsed .brand-left {
        justify-content: flex-start !important;
        width: auto !important;
    }

    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .sidebar-section-title,
    body.sidebar-collapsed .sidebar-menu .title,
    body.sidebar-collapsed .user-meta {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
        margin: initial !important;
    }

    body.sidebar-collapsed .brand-copy {
        display: grid !important;
    }

    body.sidebar-collapsed .sidebar-section-title {
        padding: 12px 10px 5px !important;
    }

    body.sidebar-collapsed .user-meta {
        display: grid !important;
    }

    body.sidebar-collapsed .sidebar-menu {
        align-items: stretch !important;
        padding: 6px 2px 12px !important;
    }

    body.sidebar-collapsed .sidebar-menu li {
        width: 100% !important;
        display: block !important;
    }

    body.sidebar-collapsed .sidebar-menu a {
        width: 100% !important;
        height: auto !important;
        min-height: 39px !important;
        padding: 0 9px !important;
        margin: 0 !important;
        justify-content: flex-start !important;
        border-radius: 99px !important;
        background: transparent !important;
        border-color: transparent !important;
    }

    body.sidebar-collapsed .sidebar-menu a.active {
        color: var(--white) !important;
        border-color: rgba(253, 122, 0, 0.25) !important;
        background: linear-gradient(135deg, rgba(253, 122, 0, 0.14), rgba(109, 59, 255, 0.08)) !important;
    }

    body.sidebar-collapsed .sidebar-menu a:hover::after {
        display: none !important;
    }

    body.sidebar-collapsed .sidebar-menu .icon {
        width: 27px !important;
        height: 27px !important;
        border-radius: 8px !important;
        font-size: 1rem !important;
        background: rgba(253, 122, 0, 0.08) !important;
        color: var(--orange) !important;
    }

    body.sidebar-collapsed .sidebar-footer {
        display: grid !important;
        width: 100% !important;
        height: auto !important;
        padding: 10px 8px !important;
        margin: auto 0 0 !important;
        border-radius: 12px !important;
        grid-template-columns: 38px minmax(0, 1fr) 34px !important;
        background: rgba(255, 255, 255, 0.035) !important;
        border: 1px solid var(--line) !important;
    }

    body.sidebar-collapsed .logout-btn {
        display: grid !important;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 999;
        background: rgba(5, 5, 6, 0.62);
        backdrop-filter: blur(6px);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding-top: 84px;
    }

    .admin-topbar,
    .main-content > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body:not(.dashboard-body) {
        padding: 16px;
    }

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

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

    .welcome-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-orbit {
        display: none;
    }

    .metric-grid,
    .charts-grid,
    .reports-grid {
        grid-template-columns: 1fr;
    }

    .admin-section {
        padding: 18px;
    }

    .modal {
        padding: 12px;
    }

    .form-actions,
    .form-actions .btn-save,
    .form-actions .btn-cancel,
    .welcome-card .btn-save {
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .table-responsive {
        overflow: visible;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .data-table {
        border-collapse: separate;
        border-spacing: 0;
        min-width: 0;
    }

    .data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .data-table tbody {
        display: grid;
        gap: 14px;
    }

    .data-table tbody tr {
        display: grid;
        gap: 10px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background:
            linear-gradient(145deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.022)),
            var(--glass);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
    }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 0;
        border-bottom: 0;
        overflow-wrap: anywhere;
    }

    .data-table td::before {
        content: attr(data-label);
        color: rgba(247, 246, 247, 0.58);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .data-table td:empty {
        display: none;
    }

    .data-table td:last-child {
        grid-template-columns: 1fr;
        justify-items: stretch;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

    .data-table td:last-child::before {
        margin-bottom: 2px;
    }

    .data-table td[style*="text-align: right"] {
        text-align: left !important;
        padding-right: 0 !important;
    }

    .data-table .btn-action {
        width: 40px;
        height: 40px;
        margin: 3px;
    }

    .data-table td:last-child,
    .data-table td[data-label="Ações"],
    .data-table td[data-label="Acoes"] {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }

    .data-table td:last-child::before,
    .data-table td[data-label="Ações"]::before,
    .data-table td[data-label="Acoes"]::before {
        flex: 0 0 100%;
        margin-bottom: 2px;
    }

    .data-table td.license-actions-cell {
        align-items: flex-start;
    }

    .license-actions-list {
        align-items: flex-start;
    }

    .data-table .license-actions-list .btn-action {
        width: 32px;
        height: 32px;
        margin: 0;
    }

    .data-table code,
    .data-table input,
    .data-table textarea,
    .data-table select {
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .thumb-img {
        width: 74px;
        height: 74px;
    }
}

/* Custom Kanban Extensions */
.kanban-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}
.kanban-column:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.kanban-card {
    border-left: 4px solid var(--line);
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)) !important;
}
.kanban-card.priority-alta {
    border-left: 4px solid var(--red);
}
.kanban-card.priority-media {
    border-left: 4px solid var(--yellow);
}
.kanban-card.priority-baixa {
    border-left: 4px solid var(--green);
}
.kanban-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.75rem;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--gray);
}
.meta-item.user i {
    color: var(--purple);
}
.meta-item.user.unassigned {
    opacity: 0.5;
}
.meta-item.date i {
    color: var(--orange);
}
.meta-item.date.overdue {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
.meta-item.date.overdue i {
    color: var(--red);
}
.meta-item.date.due-today {
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.2);
    color: #fef08a;
}
.meta-item.date.due-today i {
    color: var(--yellow);
}
.btn-icon-edit,
.btn-icon-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 0.88rem;
    color: var(--gray);
    transition: color 0.2s, transform 0.2s;
}
.btn-icon-edit:hover {
    color: var(--orange);
    transform: scale(1.1);
}
.btn-icon-delete:hover {
    color: var(--red);
    transform: scale(1.1);
}
.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

/* Admin listings as cards only on phones and tablets */
@media (min-width: 721px) and (max-width: 1100px) {
    .table-responsive {
        overflow: visible !important;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .data-table {
        border-collapse: separate !important;
        border-spacing: 0 !important;
        min-width: 0 !important;
    }

    .data-table thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
    }

    .data-table tbody {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
        gap: 16px;
    }

    .data-table tbody tr {
        display: grid !important;
        align-content: start;
        gap: 11px;
        padding: 17px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background:
            linear-gradient(145deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.022)),
            var(--glass);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
    }

    .data-table td {
        display: grid !important;
        grid-template-columns: minmax(102px, 0.38fr) minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 0 !important;
        border-bottom: 0 !important;
        text-align: left !important;
        overflow-wrap: anywhere;
    }

    .data-table tbody tr:hover td {
        background: transparent !important;
    }

    .data-table td::before {
        content: attr(data-label);
        color: rgba(247, 246, 247, 0.58);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .data-table td[data-label="Ações"],
    .data-table td[data-label="Acoes"] {
        grid-template-columns: 1fr;
        justify-items: start;
        padding-top: 11px !important;
        border-top: 1px solid var(--line) !important;
    }

    .data-table td[colspan] {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 92px;
        padding: 24px !important;
        text-align: center !important;
    }

    .data-table td[colspan]::before,
    .data-table td:empty {
        display: none !important;
    }

    .data-table td[style*="text-align: right"] {
        text-align: left !important;
        padding-right: 0 !important;
    }

    .data-table .btn-action {
        width: 40px;
        height: 40px;
        margin: 3px;
    }

    .data-table td[data-label="Ações"],
    .data-table td[data-label="Acoes"] {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }

    .data-table td[data-label="Ações"]::before,
    .data-table td[data-label="Acoes"]::before {
        flex: 0 0 100%;
        margin-bottom: 2px;
    }

    .data-table td.license-actions-cell {
        align-items: flex-start;
    }

    .license-actions-list {
        align-items: flex-start;
    }

    .data-table .license-actions-list .btn-action {
        width: 32px;
        height: 32px;
        margin: 0;
    }

    .data-table code,
    .data-table input,
    .data-table textarea,
    .data-table select {
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .data-table .thumb-img {
        width: 76px;
        height: 76px;
    }
}

/* Licenças: preserve a tabela no tablet e use cards compactos no celular. */
@media (min-width: 721px) and (max-width: 1100px) {
    .licenses-page .licenses-table-card {
        padding: 8px;
    }

    .licenses-page .table-responsive {
        overflow-x: auto !important;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(253, 122, 0, 0.55) rgba(255, 255, 255, 0.04);
    }

    .licenses-page .data-table {
        display: table !important;
        width: 100% !important;
        min-width: 1080px !important;
        border-collapse: collapse !important;
    }

    .licenses-page .data-table thead {
        position: static !important;
        display: table-header-group !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: normal !important;
    }

    .licenses-page .data-table tbody {
        display: table-row-group !important;
    }

    .licenses-page .data-table tr,
    .licenses-page .data-table tbody tr {
        display: table-row !important;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .licenses-page .data-table th,
    .licenses-page .data-table td {
        display: table-cell !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 13px 11px !important;
        text-align: left !important;
        white-space: nowrap;
        border-bottom: 1px solid rgba(247, 246, 247, 0.065) !important;
    }

    .licenses-page .data-table th {
        font-size: 0.68rem;
    }

    .licenses-page .data-table td {
        font-size: 0.84rem;
    }

    .licenses-page .data-table td::before {
        display: none !important;
        content: none !important;
    }

    .licenses-page .data-table .license-actions-heading,
    .licenses-page .data-table .license-actions-cell {
        width: 228px !important;
        min-width: 228px !important;
        text-align: right !important;
    }

    .licenses-page .license-actions-list {
        display: inline-flex;
        flex-flow: row nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 5px;
    }

    .licenses-page .data-table .license-actions-list .btn-action {
        width: 32px;
        height: 32px;
        margin: 0;
    }
}

@media (max-width: 720px) {
    .licenses-page,
    .licenses-page .table-responsive,
    .licenses-page .data-table,
    .licenses-page .data-table tbody,
    .licenses-page .data-table tbody tr {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .licenses-page .table-responsive {
        overflow: visible !important;
    }

    .licenses-page .data-table {
        table-layout: fixed;
    }

    .licenses-page .licenses-table-card {
        padding: 7px;
        border-radius: 17px;
        overflow: hidden;
    }

    .licenses-page .data-table tbody {
        gap: 12px;
    }

    .licenses-page .data-table tbody tr {
        gap: 0;
        padding: 15px;
        border-radius: 15px;
    }

    .licenses-page .data-table td {
        display: grid !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        grid-template-columns: minmax(88px, 0.38fr) minmax(0, 1fr);
        gap: 10px;
        min-height: 40px;
        padding: 8px 0;
        border-bottom: 1px solid rgba(247, 246, 247, 0.055);
        overflow: hidden;
    }

    .licenses-page .data-table td > * {
        min-width: 0;
        max-width: 100%;
    }

    .licenses-page .data-table td code {
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .licenses-page .data-table td::before {
        font-size: 0.67rem;
    }

    .licenses-page .data-table td:last-child,
    .licenses-page .data-table td.license-actions-cell {
        display: flex !important;
        align-items: stretch;
        padding-top: 13px;
        padding-bottom: 0;
        border-top: 0;
        border-bottom: 0;
    }

    .licenses-page .license-actions-list {
        display: flex;
        flex-flow: row nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 5px;
        width: 100%;
    }

    .licenses-page .data-table .license-actions-list .btn-action {
        flex: 1 1 34px;
        width: auto;
        min-width: 32px;
        max-width: 42px;
        height: 38px;
        margin: 0;
    }
}
.integration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.integration-card { margin: 0; }
.integration-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.integration-heading h3 { margin: 2px 0 4px; border: 0; padding: 0; }
.integration-heading p, .integration-heading span, .meet-create-bar small, .integration-form small, .integration-muted { color: var(--text-gray); }
.integration-heading span { font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.integration-heading p { margin: 0; font-size: .84rem; }
.integration-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; background: rgba(109,59,255,.16); color: #9f7cff; }
.whatsapp-card .integration-icon { background: rgba(37,211,102,.14); color: #25d366; }
.integration-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.integration-form .form-group:first-of-type, .whatsapp-card .integration-form .form-group, .full-field { grid-column: 1 / -1; }
.integration-form textarea { min-height: 94px; resize: vertical; }
.integration-form label { color: var(--white); display: block; margin-bottom: 7px; font-size: .84rem; font-weight: 600; }
.integration-form small { display: block; margin-top: 6px; font-size: .72rem; }
.integration-warning { padding: 12px 14px; margin: 0 0 16px; border: 1px solid rgba(255,180,0,.28); border-radius: 10px; background: rgba(255,180,0,.09); color: #ffd36a; font-size: .82rem; }
.integration-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: .78rem; }
.integration-status.is-simulated { color: #ffd36a; }
.integration-status.is-enabled { color: #66e39a; }
.participants-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.participants-heading label { margin: 0; }
.participants-list { display: grid; gap: 10px; }
.participant-row { display: grid; grid-template-columns: 1fr 1.2fr 1fr 36px; gap: 8px; align-items: center; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.025); }
.participant-row .channel-option { display: inline-flex; align-items: center; gap: 5px; margin: 0; white-space: nowrap; font-size: .75rem; }
.participant-row .channel-option:first-of-type { grid-column: 1; }
.participant-row .channel-option:nth-of-type(2) { grid-column: 2; }
.participant-remove { grid-column: 4; grid-row: 1; width: 34px; height: 34px; border: 0; border-radius: 8px; color: #ff8585; background: rgba(255,70,70,.1); cursor: pointer; }
.btn-save:disabled { opacity: .55; cursor: not-allowed; }
.integration-actions, .meeting-actions, .meet-create-bar { display: flex; align-items: center; gap: 10px; }
.integration-actions { grid-column: 1 / -1; }
.meet-create-bar { justify-content: space-between; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.btn-integration-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; padding: 10px 14px; color: var(--white); text-decoration: none; background: rgba(255,255,255,.05); font-size: .82rem; font-weight: 700; }
.btn-integration-secondary:hover { border-color: var(--orange); color: var(--orange); }
.meetings-section { margin-top: 0; }
.meeting-actions form { margin: 0; }
.meeting-actions button { font: inherit; }
.whatsapp-action { color: #25d366 !important; background: rgba(37,211,102,.12) !important; }
.integration-link { color: #9f7cff; font-weight: 700; text-decoration: none; }
.integration-empty { text-align: center; color: var(--text-gray); padding: 32px !important; }

@media (max-width: 980px) {
    .integration-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .integration-form { grid-template-columns: 1fr; }
    .integration-form .form-group, .full-field { grid-column: 1; }
    .meet-create-bar { align-items: flex-start; flex-direction: column; }
    .participant-row { grid-template-columns: 1fr; }
    .participant-row .channel-option:first-of-type,
    .participant-row .channel-option:nth-of-type(2),
    .participant-remove { grid-column: 1; grid-row: auto; }
    .participant-remove { justify-self: end; }
}
@media (min-width: 621px) and (max-width: 1180px) {
    .participant-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .participant-row .channel-option:first-of-type,
    .participant-row .channel-option:nth-of-type(2),
    .participant-remove { grid-column: auto; grid-row: auto; }
}

/* Universal Ultra-Modern Modal System */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(6, 4, 10, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: fadeInModal 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content {
    position: relative;
    width: min(92%, 640px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 100% 0%, rgba(109, 59, 255, 0.22), transparent 26rem),
        radial-gradient(circle at 0% 100%, rgba(253, 122, 0, 0.16), transparent 24rem),
        linear-gradient(170deg, #140f21, #0a0711 70%);
    border: 1px solid rgba(253, 122, 0, 0.25);
    border-radius: 24px;
    box-shadow: 0 32px 110px rgba(0, 0, 0, 0.82), 0 0 70px rgba(109, 59, 255, 0.18);
    overflow: hidden !important;
    padding: 0 !important;
}

.modal-content.modal-lg-content {
    width: min(94%, 760px) !important;
}

.modal-header {
    flex: 0 0 auto;
    position: relative;
    padding: 24px 32px 18px;
    border-bottom: 1px solid rgba(247, 246, 247, 0.08);
    background: rgba(18, 13, 28, 0.94);
    backdrop-filter: blur(14px);
    z-index: 10;
    margin: 0;
}

.modal-header h3 {
    margin: 0 0 4px;
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(253, 122, 0, 0.15);
    color: var(--orange);
    font-size: 1rem;
}

.modal-header p {
    margin: 0;
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.4;
}

.close-modal {
    position: absolute;
    top: 22px;
    right: 26px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--gray);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 15;
}

.close-modal:hover {
    color: var(--white);
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.08) rotate(90deg);
}

.modal-content form.admin-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    width: 100% !important;
    max-width: 100% !important;
}

.modal-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 26px 32px;
    scrollbar-width: thin;
    scrollbar-color: rgba(253, 122, 0, 0.5) rgba(255, 255, 255, 0.03);
}

.modal-scroll-body::-webkit-scrollbar {
    width: 7px;
}

.modal-scroll-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--orange), var(--purple));
    border-radius: 6px;
}

/* Glass Form Section Cards */
.form-section-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(247, 246, 247, 0.07);
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 22px;
    transition: border-color 0.25s ease;
}

.form-section-card:hover {
    border-color: rgba(253, 122, 0, 0.2);
}

.form-section-title {
    color: var(--orange);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title i {
    color: var(--orange);
}

/* Grid & Form Fields */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

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

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray);
}

.modal-scroll-body input[type="text"],
.modal-scroll-body input[type="number"],
.modal-scroll-body input[type="date"],
.modal-scroll-body select,
.modal-scroll-body textarea {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    background: #08060c;
    border: 1px solid rgba(247, 246, 247, 0.12);
    color: var(--white);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.modal-scroll-body textarea {
    height: auto;
    padding: 12px 16px;
}

.modal-scroll-body input:focus,
.modal-scroll-body select:focus,
.modal-scroll-body textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3.5px rgba(253, 122, 0, 0.18);
    background: #0c0914;
}

/* Service Checkbox Switch Cards */
.service-toggle-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(247, 246, 247, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    transition: all 0.2s ease;
}

.service-toggle-card:hover {
    background: rgba(253, 122, 0, 0.04);
    border-color: rgba(253, 122, 0, 0.25);
}

.service-toggle-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.service-toggle-header input[type="checkbox"] {
    width: 19px;
    height: 19px;
    accent-color: var(--orange);
    cursor: pointer;
    flex: 0 0 auto;
}

.service-toggle-header span {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--white);
}

/* Modal Footer & Buttons */
.modal-fixed-footer {
    flex: 0 0 auto;
    padding: 18px 32px 22px;
    border-top: 1px solid rgba(247, 246, 247, 0.08);
    background: rgba(14, 10, 22, 0.97);
    backdrop-filter: blur(14px);
    z-index: 10;
}

.modal-fixed-footer .contract-total-banner {
    background: linear-gradient(135deg, rgba(253, 122, 0, 0.18), rgba(109, 59, 255, 0.14));
    border: 1px solid rgba(253, 122, 0, 0.35);
    border-radius: 16px;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-fixed-footer .contract-total-banner strong {
    color: var(--orange);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.modal-fixed-footer .form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 0;
}

.modal-fixed-footer .btn-save {
    height: 48px;
    padding: 0 26px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.92rem;
    background: linear-gradient(135deg, var(--orange), #fd5200);
    box-shadow: 0 12px 28px rgba(253, 122, 0, 0.32);
    border: 0;
    color: #110703;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-fixed-footer .btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(253, 122, 0, 0.42);
}

.modal-fixed-footer .btn-cancel {
    height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-fixed-footer .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

@media (max-width: 768px) {
    .modal {
        padding: 8px;
    }
    .modal-content {
        width: 100% !important;
        max-height: 94vh !important;
        border-radius: 18px !important;
    }
    .modal-scroll-body {
        padding: 18px 16px;
    }
    .modal-header {
        padding: 18px 16px 14px;
    }
    .modal-fixed-footer {
        padding: 14px 16px;
    }
    .modal-fixed-footer .form-actions {
        flex-direction: column-reverse;
        width: 100%;
    }
    .modal-fixed-footer .btn-save,
    .modal-fixed-footer .btn-cancel,
    .modal-fixed-footer a.btn-cancel,
    .modal-fixed-footer a.btn-save {
        width: 100% !important;
        text-align: center;
        justify-content: center;
        display: flex;
        align-items: center;
    }
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 12px;
    background: #08060c;
    border: 1px solid rgba(247, 246, 247, 0.12);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.checkbox-card:hover {
    border-color: rgba(253, 122, 0, 0.4);
    background: rgba(253, 122, 0, 0.05);
}

.checkbox-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--orange);
    cursor: pointer;
    flex: 0 0 auto;
    margin: 0;
}

.checkbox-card span {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--white);
}
