/* ===================================================================
   Phoenix Tailwind v1.2.0 Design System for Textiles Admin Panel
   Colors, Typography (Nunito Sans), Layout, Components & Dark/Light Themes
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;0,900;1,400;1,700&display=swap');

:root {
    /* Brand Colors */
    --phoenix-primary: #3874ff;
    --phoenix-primary-hover: #2c5be0;
    --phoenix-primary-subtle: #e6eeff;
    --phoenix-primary-rgb: 56, 116, 255;
    
    --phoenix-success: #25b003;
    --phoenix-success-subtle: #e8f7ee;
    --phoenix-success-rgb: 37, 176, 3;

    --phoenix-warning: #fa6c00;
    --phoenix-warning-subtle: #fef3e9;
    --phoenix-warning-rgb: 250, 108, 0;

    --phoenix-danger: #e63757;
    --phoenix-danger-subtle: #fdecee;
    --phoenix-danger-rgb: 230, 55, 87;

    --phoenix-info: #0097ec;
    --phoenix-info-subtle: #e5f5fd;
    --phoenix-info-rgb: 0, 151, 236;

    --phoenix-purple: #8c57ff;
    --phoenix-purple-subtle: #f3edff;

    /* Light Mode Variables */
    --bg-body: #f5f7fa;
    --bg-surface: #ffffff;
    --bg-surface-secondary: #f9fafd;
    --bg-topbar: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-hover: #f1f4f8;
    --bg-active: #e8f1ff;
    
    --text-primary: #141824;
    --text-secondary: #525b75;
    --text-muted: #8592a6;
    --text-subtle: #9ca3af;
    
    --border-color: #e3e6ed;
    --border-light: #eff2f6;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-dropdown: 0 12px 32px rgba(15, 23, 42, 0.12);

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 76px;
    --topbar-height: 66px;
    --transition-speed: 0.25s;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;
}

/* Dark Mode Overrides */
html.dark,
body.dark-theme,
[data-theme="dark"] {
    --bg-body: #0b1329;
    --bg-surface: #141f3d;
    --bg-surface-secondary: #111a33;
    --bg-topbar: #0f172a;
    --bg-sidebar: #0f172a;
    --bg-hover: #1b284e;
    --bg-active: #192d5c;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-subtle: #475569;

    --border-color: #223354;
    --border-light: #1a2744;

    --phoenix-primary-subtle: rgba(56, 116, 255, 0.18);
    --phoenix-success-subtle: rgba(37, 176, 3, 0.18);
    --phoenix-warning-subtle: rgba(250, 108, 0, 0.18);
    --phoenix-danger-subtle: rgba(230, 55, 87, 0.18);
    --phoenix-info-subtle: rgba(0, 151, 236, 0.18);
    --phoenix-purple-subtle: rgba(140, 87, 255, 0.18);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-dropdown: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ===================================================================
   Global Resets & Base Styles
   =================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    overflow-x: hidden;
}

a {
    color: var(--phoenix-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--phoenix-primary-hover);
    text-decoration: none;
}

/* ===================================================================
   Layout: Shell, Top Navbar, Sidebar & Main Content
   =================================================================== */
.phoenix-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Top Navbar */
.phoenix-navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--topbar-height);
    background-color: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1020;
    transition: all var(--transition-speed) ease;
}

.navbar-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.phoenix-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.phoenix-brand-logo svg,
.phoenix-brand-logo img {
    height: 32px;
    width: 32px;
}

.phoenix-brand-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    background: var(--phoenix-primary-subtle);
    color: var(--phoenix-primary);
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Search Bar in Topbar */
.phoenix-search-box {
    position: relative;
    max-width: 360px;
    width: 100%;
    margin-left: 20px;
}

.phoenix-search-input {
    width: 100%;
    height: 38px;
    padding: 8px 38px 8px 38px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.phoenix-search-input:focus {
    background: var(--bg-surface);
    border-color: var(--phoenix-primary);
    box-shadow: 0 0 0 3px rgba(var(--phoenix-primary-rgb), 0.15);
}

.phoenix-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 15px;
    height: 15px;
}

.phoenix-search-kbd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 600;
}

/* Navbar Action Items */
.navbar-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.nav-icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-icon-btn .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: var(--phoenix-danger);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-topbar);
}

.btn-store-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--phoenix-primary-subtle);
    color: var(--phoenix-primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 1px solid rgba(var(--phoenix-primary-rgb), 0.18);
    transition: all 0.2s ease;
}

.btn-store-link:hover {
    background: var(--phoenix-primary);
    color: #ffffff;
}

/* Profile Dropdown */
.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-full);
    transition: background 0.2s ease;
    position: relative;
}

.user-profile-menu:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--phoenix-primary);
    background: var(--phoenix-primary-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--phoenix-primary);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-info-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-info-role {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Dropdown Menu Container */
.phoenix-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dropdown);
    min-width: 220px;
    padding: 8px;
    z-index: 1050;
    display: none;
    animation: dropdownFade 0.15s ease;
}

.phoenix-dropdown.show {
    display: block;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.dropdown-item-link:hover {
    background: var(--bg-hover);
    color: var(--phoenix-primary);
}

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

/* ===================================================================
   Sidebar Navigation (Phoenix Style)
   =================================================================== */
.phoenix-sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1010;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1), transform var(--transition-speed) ease;
}

.phoenix-sidebar::-webkit-scrollbar {
    width: 5px;
}
.phoenix-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.sidebar-content {
    padding: 16px 12px 24px 12px;
}

.sidebar-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 14px 14px 6px 14px;
    margin-top: 6px;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
    position: relative;
}

.nav-item-link .nav-link-content {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.nav-item-link i,
.nav-item-link svg {
    width: 18px;
    height: 18px;
    font-size: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.18s ease;
}

.nav-item-link:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item-link:hover i,
.nav-item-link:hover svg {
    color: var(--phoenix-primary);
}

.nav-item-link.active {
    background-color: var(--phoenix-primary-subtle);
    color: var(--phoenix-primary);
    font-weight: 700;
}

.nav-item-link.active i,
.nav-item-link.active svg {
    color: var(--phoenix-primary);
}

.nav-item-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--phoenix-primary);
    border-radius: 0 4px 4px 0;
}

.nav-item-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: var(--phoenix-primary);
    color: #ffffff;
}

/* Sidebar Submenus */
.nav-submenu {
    list-style: none;
    padding: 4px 0 4px 34px;
    margin: 0;
    display: none;
}

.nav-submenu.show {
    display: block;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.submenu-link:hover {
    color: var(--phoenix-primary);
    background: var(--bg-hover);
}

.submenu-link.active {
    color: var(--phoenix-primary);
    font-weight: 700;
}

/* Sidebar Footer (Collapse Toggle) */
.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-sidebar);
}

.btn-collapse-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-collapse-sidebar:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Collapsed Sidebar State */
body.sidebar-collapsed .phoenix-sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .nav-item-link span:not(.nav-item-badge),
body.sidebar-collapsed .nav-item-badge,
body.sidebar-collapsed .sidebar-footer span,
body.sidebar-collapsed .dropdown-indicator-icon,
body.sidebar-collapsed .nav-submenu {
    display: none !important;
}

body.sidebar-collapsed .nav-item-link {
    justify-content: center;
    padding: 12px 0;
}

body.sidebar-collapsed .btn-collapse-sidebar {
    justify-content: center;
    padding: 8px 0;
}

body.sidebar-collapsed .phoenix-main {
    margin-left: var(--sidebar-collapsed-width);
}

/* Mobile Sidebar Drawer */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1005;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===================================================================
   Main Content Area
   =================================================================== */
.phoenix-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 28px 32px 48px 32px;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.phoenix-container {
    max-width: 1440px;
    margin: 0 auto;
}

/* Phoenix Footer */
.phoenix-footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===================================================================
   Phoenix UI Components: Cards, Stat Badges, KPIs, Tables & Modals
   =================================================================== */

/* Cards */
.phoenix-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.phoenix-card:hover {
    box-shadow: var(--shadow-md);
}

.card-header-phoenix {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.card-title-phoenix {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.card-subtitle-phoenix {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

.card-body-phoenix {
    padding: 24px;
}

/* KPI / Metric Cards */
.kpi-card {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.kpi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kpi-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.kpi-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-primary {
    background: var(--phoenix-primary-subtle);
    color: var(--phoenix-primary);
}
.kpi-icon-success {
    background: var(--phoenix-success-subtle);
    color: var(--phoenix-success);
}
.kpi-icon-warning {
    background: var(--phoenix-warning-subtle);
    color: var(--phoenix-warning);
}
.kpi-icon-danger {
    background: var(--phoenix-danger-subtle);
    color: var(--phoenix-danger);
}
.kpi-icon-purple {
    background: var(--phoenix-purple-subtle);
    color: var(--phoenix-purple);
}

.kpi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    font-size: 13px;
}

/* Status Pill Counters (Phoenix Top Dashboard Highlights) */
.status-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.status-highlight-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    flex: 1;
    min-width: 220px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.status-highlight-pill:hover {
    border-color: var(--phoenix-primary);
    transform: translateY(-2px);
}

.status-icon-pill {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.status-info-count {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.status-info-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Badges */
.badge-phoenix {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.badge-phoenix-primary {
    background: var(--phoenix-primary-subtle);
    color: var(--phoenix-primary);
}

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

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

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

.badge-phoenix-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* Buttons */
.btn-phoenix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-phoenix-primary {
    background-color: var(--phoenix-primary);
    color: #ffffff;
}
.btn-phoenix-primary:hover {
    background-color: var(--phoenix-primary-hover);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(var(--phoenix-primary-rgb), 0.35);
}

.btn-phoenix-secondary {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-phoenix-secondary:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.btn-phoenix-subtle {
    background-color: var(--phoenix-primary-subtle);
    color: var(--phoenix-primary);
}
.btn-phoenix-subtle:hover {
    background-color: var(--phoenix-primary);
    color: #ffffff;
}

.btn-phoenix-danger {
    background-color: var(--phoenix-danger);
    color: #ffffff;
}
.btn-phoenix-danger:hover {
    background-color: #c92a47;
    color: #ffffff;
}

.btn-phoenix-success {
    background-color: var(--phoenix-success);
    color: #ffffff;
}
.btn-phoenix-success:hover {
    background-color: #1e8f02;
    color: #ffffff;
}

.btn-phoenix-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-phoenix-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* Modern Phoenix Data Table */
.phoenix-table-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.phoenix-table-toolbar {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

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

.phoenix-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.phoenix-table th {
    padding: 12px 18px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background-color: var(--bg-surface-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.phoenix-table td {
    padding: 14px 18px;
    font-size: 13.5px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    background-color: var(--bg-surface);
    transition: background-color 0.15s ease;
}

.phoenix-table tbody tr:hover td {
    background-color: var(--bg-hover);
}

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

.phoenix-table-pagination {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-surface);
    font-size: 13px;
    color: var(--text-muted);
}

/* Form Controls */
.phoenix-input-group {
    margin-bottom: 18px;
}

.phoenix-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.phoenix-input,
.phoenix-select,
.phoenix-textarea {
    width: 100%;
    padding: 9px 14px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.phoenix-input:focus,
.phoenix-select:focus,
.phoenix-textarea:focus {
    border-color: var(--phoenix-primary);
    box-shadow: 0 0 0 3px rgba(var(--phoenix-primary-rgb), 0.15);
}

.phoenix-input::placeholder {
    color: var(--text-subtle);
}

/* Alerts */
.phoenix-alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    border: 1px solid transparent;
}

.phoenix-alert-success {
    background-color: var(--phoenix-success-subtle);
    color: #156903;
    border-color: rgba(var(--phoenix-success-rgb), 0.2);
}
html.dark .phoenix-alert-success,
body.dark-theme .phoenix-alert-success {
    color: #55d638;
}

.phoenix-alert-danger {
    background-color: var(--phoenix-danger-subtle);
    color: #a31832;
    border-color: rgba(var(--phoenix-danger-rgb), 0.2);
}
html.dark .phoenix-alert-danger,
body.dark-theme .phoenix-alert-danger {
    color: #ff6b87;
}

.phoenix-alert-info {
    background-color: var(--phoenix-info-subtle);
    color: #006096;
    border-color: rgba(var(--phoenix-info-rgb), 0.2);
}

/* Modal Dialog */
.phoenix-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.phoenix-modal-backdrop.show {
    display: flex;
}

.phoenix-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.phoenix-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.phoenix-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

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

.phoenix-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: var(--bg-surface-secondary);
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    .phoenix-sidebar {
        transform: translateX(-100%);
    }
    .phoenix-sidebar.open {
        transform: translateX(0);
    }
    .phoenix-main {
        margin-left: 0 !important;
        padding: 20px 16px 40px 16px;
    }
    .mobile-nav-toggle {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .mobile-nav-toggle {
        display: none !important;
    }
}
