/* Firelynk Admin Theme - v6.0 Production Polish */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #FF862C;
    --primary-dark: #e5701b;
    --primary-light: #FF9F57;
    --primary-fade: rgba(255, 134, 44, 0.08);

    --bg-app: #F9FAFB;
    /* Cool Grey 50 */
    --bg-surface: #FFFFFF;
    /* White */
    --bg-sidebar: #FFFFFF;

    --border-subtle: #F3F4F6;
    /* Gray 100 */
    --border-medium: #E5E7EB;
    /* Gray 200 */

    --text-main: #111827;
    /* Gray 900 */
    --text-secondary: #4B5563;
    /* Gray 600 */
    --text-muted: #9CA3AF;
    /* Gray 400 */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body,
html {
    background-color: var(--bg-app) !important;
    color: var(--text-main) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    height: 100%;
}

/* ========================================= */
/* Layout Structure                          */
/* ========================================= */

.saas-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Sidebar */
.saas-sidebar {
    width: 280px;
    /* Wider sidebar */
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-medium);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    border-bottom: 2px solid var(--border-subtle);
}

.sidebar-logo {
    height: 26px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.sidebar-logo:hover {
    opacity: 1;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
}

.menu-label {
    padding: 24px 16px 12px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    font-weight: 700;
}

.menu-label:first-child {
    padding-top: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover {
    background: var(--bg-app);
    color: var(--text-main);
}

.menu-item.active {
    background: var(--primary-fade);
    color: var(--primary);
    font-weight: 600;
}

.menu-item i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 16px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.menu-item:hover i {
    color: var(--text-secondary);
}

.menu-item.active i {
    color: var(--primary);
}

.submenu {
    padding-left: 0;
}

.submenu-item {
    display: block;
    padding: 8px 16px 8px 48px;
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.submenu-item:hover {
    color: var(--text-main);
    background: var(--bg-app);
}

.submenu-item.active {
    color: var(--primary);
    background: var(--primary-fade);
    font-weight: 500;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-medium);
    background: var(--bg-app);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-surface);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-sm);
}

.avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 2px 4px rgba(255, 134, 44, 0.3);
}

.username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    display: block;
}

.role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Content */
.saas-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
    width: calc(100% - 280px);
    /* Explicit width to prevent overflow */
    min-width: 0;
    /* Allow flex child to shrink */
}

.saas-header {
    height: 72px;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
    gap: 24px;
    /* Space between title and tools */
}

/* Wrapper for title to allow truncation */
.header-left {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-app);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 45;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .saas-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 50;
        width: 280px;
    }

    body.sidebar-open .saas-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
        opacity: 1;
    }

    .saas-main {
        width: 100% !important;
    }

    .saas-header {
        padding: 0 16px;
        gap: 12px;
    }

    .page-title {
        font-size: 18px;
    }

    .user-tools span {
        display: none;
        /* Hide "Welcome, user" on small screens */
    }

    .content-wrapper {
        padding: 24px 16px;
    }
}

.header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-tools {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.user-tools a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.user-tools a:hover {
    text-decoration: underline;
}

.view-site-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    color: var(--text-main);
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.view-site-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Content Area */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 40px 32px;
}

/* ========================================= */
/* Django Admin Overrides                    */
/* ========================================= */

#header,
.breadcrumbs {
    display: none !important;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Forms / Inputs Polish */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-medium) !important;
    color: var(--text-main) !important;
    padding: 12px 16px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 14px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    box-shadow: var(--shadow-sm);
}

input:hover,
textarea:hover,
select:hover {
    border-color: #D1D5DB !important;
    /* Gray 300 */
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 4px var(--primary-fade) !important;
    background: #FFFFFF !important;
}

label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

.form-row {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.form-row:last-child {
    border-bottom: none;
}

/* Tables */
#changelist {
    display: block;
}

#changelist-filter {
    position: static;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    margin: 0 0 24px 0;
    box-shadow: var(--shadow-sm);
    width: 100%;
    box-sizing: border-box;
}

#changelist-filter h2 {
    font-size: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-medium);
    margin: 0;
    background: var(--bg-app);
    color: var(--text-main);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

#changelist-filter ul {
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

#changelist-filter li {
    list-style: none;
}

#changelist-filter a {
    color: var(--text-secondary);
    text-decoration: none;
}

#changelist-filter li.selected a {
    color: var(--primary);
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
}

#changelist table {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    border-spacing: 0;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

#changelist table thead th {
    background: var(--bg-app);
    color: var(--text-secondary);
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-medium);
    text-align: left;
}

#changelist table tbody td,
#changelist table tbody th {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
    color: var(--text-main);
}

#changelist table tbody tr {
    transition: background 0.1s;
}

#changelist table tbody tr:hover {
    background: var(--bg-app);
}

#changelist table tbody tr:last-child td {
    border-bottom: none;
}

#changelist table tbody th a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

#changelist table tbody th a:hover {
    text-decoration: underline;
}

/* Buttons & Actions */
.button,
input[type=submit],
.submit-row input {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    padding: 11px 22px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(255, 134, 44, 0.25);
    transition: all 0.2s;
}

.button:hover,
input[type=submit]:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(255, 134, 44, 0.3);
}

.deletelink:hover {
    background: #FEF2F2 !important;
    border-color: #EF4444 !important;
    color: #991B1B !important;
}

/* ========================================= */
/* Calendar & Date Widgets Fix               */
/* ========================================= */
.calendarbox,
.clockbox {
    z-index: 10000 !important;
    background: #FFFFFF !important;
    border: 1px solid var(--border-medium) !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: var(--radius-md) !important;
    margin-top: 5px !important;
}

.calendar table {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
}

.calendar caption {
    background: var(--bg-app) !important;
    color: var(--text-main) !important;
    font-weight: 700 !important;
    padding: 10px !important;
    border-bottom: 1px solid var(--border-medium) !important;
}

.calendar th {
    background: var(--bg-surface) !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
}

.calendar td a {
    color: var(--text-main) !important;
    padding: 6px !important;
    display: block !important;
    border-radius: var(--radius-sm) !important;
}

.calendar td a:hover,
.calendar td.selected a {
    background: var(--primary) !important;
    color: white !important;
}

.calendar-shortcuts {
    background: var(--bg-surface) !important;
    border-top: 1px solid var(--border-medium) !important;
    padding: 8px !important;
    color: var(--text-secondary) !important;
}

/* Icons for date/time */
.datetimeshortcuts .icon-calendar,
.datetimeshortcuts .icon-time,
.datetimeshortcuts .icon-clock {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.datetimeshortcuts .icon-calendar:hover,
.datetimeshortcuts .icon-time:hover,
.datetimeshortcuts .icon-clock:hover {
    opacity: 1;
}

/* ========================================= */
/* Inlines & Fieldsets (Tab-like Polish)     */
/* ========================================= */
.inline-group {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    /* overflow: hidden;  <-- REMOVED to allow calendar popup */
    box-shadow: var(--shadow-sm);
}

.inline-group .tabular .module,
.inline-group .aligned .module {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Header looks like a Tab/Panel Header */
.inline-group h2,
fieldset.module h2 {
    background: var(--bg-app) !important;
    color: var(--text-main) !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid var(--border-medium) !important;
    margin: 0 !important;
    font-weight: 700 !important;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

/* Inline Rows */
.inline-related {
    border-bottom: 1px solid var(--border-subtle);
}

.inline-related h3 {
    color: var(--text-secondary);
    font-size: 13px;
    background: transparent;
    border-top: 1px solid var(--border-subtle);
    margin: 0;
    padding: 12px 20px;
}

.inline-related.no-header h3 {
    display: none;
}

/* ========================================= */
/* Custom Tabs Styling                       */
/* ========================================= */
.admin-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: transparent;
    /* Or #F3F4F6 if needed */
}

.admin-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.admin-tab-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.admin-tab-btn.active {
    background: #FFFFFF;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

/* Hide the default headers inside tabs since they are now tabs */
.hidden-in-tab {
    display: none !important;
}

/* Fieldsets */
fieldset.module,
.inline-group {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm) !important;
    margin-bottom: 24px !important;
    padding: 24px !important;
    /* Added padding for content */
}

/* Remove internal borders/shadows if we want a pure clean look inside */
.inline-group .tabular .module,
.inline-group .aligned .module {
    box-shadow: none !important;
    border: none !important;
}

.form-row {
    padding: 16px 20px !important;
}

/* ========================================= */
/* Login View Overrides                      */
/* ========================================= */
body.login-view .saas-sidebar {
    display: none !important;
}

body.login-view .saas-header {
    display: none !important;
}

body.login-view .saas-main {
    width: 100% !important;
    background: transparent !important;
    margin: 0 !important;
}

body.login-view .content-wrapper {
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

body.login-view .saas-container {
    background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%) !important;
}

/* ========================================= */
/* Dashboard Polish (v12.0)                  */
/* ========================================= */

.dashboard-header-wrapper {
    margin-bottom: 32px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.dashboard-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
}

.header-date {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

/* KPI Cards Refined */
.kpi-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(255, 134, 44, 0.2);
}

.kpi-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.icon-blue {
    background: #E0F2FE;
    color: #0284C7;
}

.icon-red {
    background: #FEE2E2;
    color: #DC2626;
}

.icon-purple {
    background: #F3E8FF;
    color: #9333EA;
}

.icon-green {
    background: #DCFCE7;
    color: #16A34A;
}

.kpi-data {
    flex: 1;
}

.kpi-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 8px;
}

.kpi-value.warning {
    color: #DC2626;
}

.kpi-value.success {
    color: #16A34A;
}

.kpi-trend {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trend-up {
    color: #16A34A;
}

.trend-down {
    color: #DC2626;
}

/* Chart Widget */
.chart-widget {
    padding: 0;
    overflow: hidden;
}

.chart-placeholder {
    padding: 24px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
}

.chart-mockup {
    width: 100%;
    height: 240px;
    position: relative;
}

.chart-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 6px rgba(255, 134, 44, 0.2));
}

.chart-tooltip {
    position: absolute;
    background: #111827;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    transform: translate(-50%, -120%);
}

.chart-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px 4px 0;
    border-style: solid;
    border-color: #111827 transparent transparent transparent;
}

.chart-select {
    padding: 6px 12px !important;
    font-size: 12px !important;
    height: auto !important;
    width: auto !important;
}

/* Actions Grid */
.actions-widget {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.actions-widget .widget-header {
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.action-card {
    background: #FFFFFF;
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    gap: 12px;
    height: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.action-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.action-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #F9FAFB;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-app);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.action-card:hover .action-icon {
    transform: scale(1.1);
}

.action-icon i {
    transition: transform 0.2s;
}

.action-card:hover i {
    transform: scale(1.1);
}

/* Specific Action Colors */
.action-card:nth-child(1) .action-icon {
    background: #EEF2FF;
    color: #4F46E5;
}

.action-card:nth-child(2) .action-icon {
    background: #ECFDF5;
    color: #059669;
}

.action-card:nth-child(3) .action-icon {
    background: #FFF7ED;
    color: #EA580C;
}

.action-card:nth-child(4) .action-icon {
    background: #F5F3FF;
    color: #7C3AED;
}

.action-card:nth-child(5) .action-icon {
    background: #FEF2F2;
    color: #DC2626;
}

.action-card:hover:nth-child(1) .action-icon {
    background: #4F46E5;
    color: white;
}

.action-card:hover:nth-child(2) .action-icon {
    background: #059669;
    color: white;
}

.action-card:hover:nth-child(3) .action-icon {
    background: #EA580C;
    color: white;
}

.action-card:hover:nth-child(4) .action-icon {
    background: #7C3AED;
    color: white;
}

.action-card:hover:nth-child(5) .action-icon {
    background: #DC2626;
    color: white;
}

.action-card span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    z-index: 100;
    margin-top: 8px;
    padding: 4px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.1s;
}

.dropdown-item:hover {
    background-color: var(--bg-app);
    color: var(--primary);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}