/* =====================================================
   CargoSimplify — Global Styles
   Professional Admin Dashboard
   ===================================================== */

:root {
    --primary: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --accent: #69f0ae;
    --accent-dark: #00c853;
    --warn: #f44336;
    --success: #4caf50;
    --warning: #ff9800;
    --info: #2196f3;
    --background: #f1f5f9;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

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

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--background);
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ── */
.main-content-area {
    background: var(--background);
    min-height: 100vh;
}

/* ── Sidebar Styles ── */
.mud-drawer {
    border-right: none !important;
}

.sidebar-logo-area {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
}

.sidebar-logo-img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-logo-text {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    color: white;
}

.sidebar-section-label {
    padding: 16px 16px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    overflow: hidden;
}

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

.sidebar-navmenu .mud-nav-link {
    border-radius: 10px !important;
    margin: 2px 0;
    padding: 10px 14px !important;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7) !important;
    transition: all var(--transition);
}

.sidebar-navmenu .mud-nav-link:hover {
    background: rgba(255,255,255,0.08) !important;
    color: white !important;
}

.sidebar-navmenu .mud-nav-link.active {
    background: #1976d2 !important;
    color: white !important;
    font-weight: 600;
}

.sidebar-navmenu .mud-nav-link .mud-nav-link-icon {
    color: inherit !important;
    margin-right: 12px;
}

.sidebar-navmenu .mud-nav-group-text {
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-navmenu .mud-nav-group .mud-nav-link {
    padding-left: 40px !important;
}

.sidebar-navmenu .mud-collapse-wrapper {
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    margin: 2px 0;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── User Menu ── */
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background var(--transition);
}

.user-menu-trigger:hover {
    background: rgba(0,0,0,0.04);
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-menu-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-menu-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.user-menu-role {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* ── Page Header ── */
.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

/* ── Angular-Style Stat Cards ── */
.stat-card-ng {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}

.stat-card-ng:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.stat-icon-badge {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-badge-blue   { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.stat-icon-badge-green  { background: linear-gradient(135deg, #059669, #34d399); }
.stat-icon-badge-purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.stat-icon-badge-orange { background: linear-gradient(135deg, #d97706, #fbbf24); }
.stat-icon-badge-cyan   { background: linear-gradient(135deg, #0891b2, #22d3ee); }

.stat-ng-number {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-ng-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.stat-trend.up { color: #16a34a; }
.stat-trend.down { color: #dc2626; }

/* ── Welcome Banner ── */
.welcome-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 50%, #2563eb 100%);
    border-radius: 16px;
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: 30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    pointer-events: none;
}

.welcome-banner h1 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}

.welcome-banner p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.welcome-date-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Dashboard Card Headers ── */
.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.dash-card-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dash-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-card-icon.blue   { background: rgba(37,99,235,0.08);  color: #2563eb; }
.dash-card-icon.amber  { background: rgba(217,119,6,0.08);  color: #d97706; }
.dash-card-icon.green  { background: rgba(5,150,105,0.08);  color: #059669; }
.dash-card-icon.purple { background: rgba(124,58,237,0.08); color: #7c3aed; }
.dash-card-icon.cyan   { background: rgba(8,145,178,0.08);  color: #0891b2; }
.dash-card-icon.red    { background: rgba(220,38,38,0.08);  color: #dc2626; }

.dash-card-body {
    padding: 16px 24px 24px;
}

.dash-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.dash-card-subtitle {
    font-size: 12px;
    color: #94a3b8;
}

/* ── Status Badges ── */
.badge-active   { background: #d1fae5; color: #047857; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.badge-inactive { background: #fee2e2; color: #dc2626; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.badge-info     { background: #dbeafe; color: #1d4ed8; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.badge-warning  { background: #fef9c3; color: #a16207; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.badge-success  { background: #dcfce7; color: #16a34a; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.badge-danger   { background: #fee2e2; color: #dc2626; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.badge-purple   { background: #f3e8ff; color: #7c3aed; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }

/* ── Login Page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    background: #f1f5f9;
}

.login-brand-panel {
    flex: 1.1;
    background: linear-gradient(160deg, #1e3a5f 0%, #1e40af 50%, #2563eb 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
    color: white;
}

.brand-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 480px;
    width: 100%;
}

/* Floating decorative circles */
.brand-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    z-index: 1;
}

.brand-circle-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation: float 8s ease-in-out infinite;
}

.brand-circle-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 15%;
    animation: float 6s ease-in-out infinite 1s;
}

.brand-circle-3 {
    width: 60px;
    height: 60px;
    bottom: 15%;
    left: 20%;
    animation: float 10s ease-in-out infinite 2s;
}

.brand-circle-4 {
    width: 150px;
    height: 150px;
    top: 30%;
    right: 5%;
    animation: float 12s ease-in-out infinite 0.5s;
}

.brand-circle-5 {
    width: 40px;
    height: 40px;
    top: 80%;
    left: 60%;
    animation: float 7s ease-in-out infinite 3s;
}

.brand-circle-6 {
    display: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-30px) rotate(180deg); opacity: 0.6; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

/* Right panel background circles */
.form-bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(0,0,0,0.02);
    z-index: 0;
}

.form-bg-circle-1 {
    width: 200px;
    height: 200px;
    top: 20%;
    right: -60px;
    animation: float 8s ease-in-out infinite;
}

.form-bg-circle-2 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: -40px;
    animation: float 10s ease-in-out infinite reverse;
}

.login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    background: #f0f4f8;
    position: relative;
    overflow: hidden;
}

.login-form-card {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    position: relative;
    z-index: 1;
}

/* Field labels above inputs */
.login-field-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

/* Password wrapper for lock icon + field */
.password-wrapper {
    position: relative;
}

.password-lock-icon {
    position: absolute;
    left: 14px;
    top: 16px;
    z-index: 2;
    color: #94a3b8 !important;
    font-size: 1.25rem !important;
}

.password-field-inner .mud-input-outlined-border {
    padding-left: 42px;
}

.password-field-inner input {
    padding-left: 42px !important;
}

.login-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    color: #94a3b8;
    font-size: 0.75rem;
}

.login-mobile-logo {
    display: none;
    margin-bottom: 24px;
}


.brand-logo {
    height: 120px;
    width: 120px;
    margin-bottom: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-name {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.5;
}

.brand-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 36px;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.brand-stat-card {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    animation: pulse 4s ease-in-out infinite;
}

.brand-stat-card:nth-child(2) { animation-delay: 0.5s; }
.brand-stat-card:nth-child(3) { animation-delay: 1s; }
.brand-stat-card:nth-child(4) { animation-delay: 1.5s; }

.brand-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.brand-stat-label {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 320px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    font-weight: 400;
    line-height: 1.4;
}

.brand-features li::before {
    display: none;
}

.feature-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 8px;
    background: rgba(16,185,129,0.15);
    color: #34d399;
    font-size: 15px;
    flex-shrink: 0;
}

.wolke-brand {
    margin-top: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.wolke-brand .wolke-logo-wrap {
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
}

.wolke-brand .wolke-logo-wrap:hover {
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ── 2FA Step ── */
.twofa-step {
    text-align: center;
}

.twofa-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
}

.otp-input input {
    text-align: center !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.3em !important;
}

/* ── Password Strength ── */
.strength-bars {
    display: flex;
    gap: 4px;
    margin: 8px 0 4px;
}

.strength-bar {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: #e2e8f0;
    transition: background 0.3s;
}

.strength-bar.active-1 { background: #ef4444; }
.strength-bar.active-2 { background: #f97316; }
.strength-bar.active-3 { background: #eab308; }
.strength-bar.active-4 { background: #059669; }
.strength-bar.active-5 { background: #047857; }

/* ── Wizard Stepper ── */
.step-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    gap: 0;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: all var(--transition);
}

.step-dot.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(25,118,210,0.15);
}

.step-dot.done {
    background: var(--success);
    color: white;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    transition: background var(--transition);
}

.step-line.done {
    background: var(--success);
}

/* ── Quick Actions ── */
.quick-action-tile {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.quick-action-tile:hover {
    border-color: #1976d2;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25,118,210,0.1);
}

/* ── Data Grid Enhancements ── */
.mud-data-grid .mud-table-head .mud-table-cell {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #f8fafc;
}

.mud-data-grid .mud-table-row:hover {
    background-color: #f8fafc;
}

/* ── Card Enhancements ── */
.card-hover {
    transition: all var(--transition);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-border-left {
    border-left: 3px solid var(--primary);
}

/* ── Section Title ── */
.section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ── Monospace Code Display ── */
.mono-code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-primary);
}

/* ── Avatar Colors ── */
.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ── Charts Section ── */
.chart-card {
    padding: 0;
}

.chart-card .mud-chart {
    padding: 16px;
}

/* ── Timeline Enhancements ── */
.mud-timeline .mud-timeline-item-dot .mud-avatar {
    font-size: 0.75rem;
}

/* ── Error / Blazor UI ── */
#blazor-error-ui {
    background: #fee2e2;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #dc2626;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        padding: 32px 20px;
        background: linear-gradient(160deg, #1565c0 0%, #1976d2 30%, #e8f0fe 30.1%, #f0f4f8 100%);
        justify-content: flex-start;
        padding-top: 60px;
    }

    .login-form-card {
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
        border: 1px solid #e2e8f0;
        padding: 32px 24px;
        border-radius: 16px;
        background: white;
    }

    .login-mobile-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 28px;
    }

    .login-mobile-logo img {
        height: 90px !important;
        width: 90px !important;
        border-radius: 50%;
        object-fit: cover;
    }

    .login-footer {
        position: static;
        margin-top: 32px;
    }

    .form-bg-circle {
        display: none;
    }

    .login-field-label {
        font-size: 0.8rem;
    }

    .page-header-row {
        flex-direction: column;
    }

    .welcome-banner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .stat-grid-5 {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .login-brand-panel {
        flex: 0 0 40%;
        padding: 40px;
    }

    .stat-grid-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* =====================================================
   Angular-Style Shared Components
   Matching the Angular Material design language
   ===================================================== */

/* ── Page Header ── */
.ng-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.ng-page-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.3px;
}
.ng-page-header p {
    font-size: 14px;
    color: #94a3b8;
    margin: 4px 0 0;
}

/* ── Buttons ── */
.ng-btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.ng-btn-primary:hover {
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}
.ng-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ng-btn-outline {
    padding: 9px 20px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.ng-btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.ng-icon-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ng-icon-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.ng-delete-btn:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

/* ── Cards ── */
.ng-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.ng-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
}
.ng-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ng-card-body {
    padding: 22px;
}

/* ── Form Card ── */
.ng-form-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}
.ng-form-card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* ── Form Layout ── */
.ng-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.ng-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.ng-span-2 {
    grid-column: span 2;
}

.ng-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ng-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.ng-req {
    color: #dc2626;
    font-weight: 700;
}

.ng-form-group input,
.ng-form-group select,
.ng-form-group textarea {
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13.5px;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    font-family: inherit;
    transition: all 0.2s;
}
.ng-form-group input::placeholder,
.ng-form-group textarea::placeholder {
    color: #94a3b8;
}
.ng-form-group input:focus,
.ng-form-group select:focus,
.ng-form-group textarea:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.ng-form-group input:disabled,
.ng-form-group select:disabled {
    opacity: 0.6;
    background: #e2e8f0;
}
.ng-form-group textarea {
    resize: vertical;
}
.ng-form-group select {
    cursor: pointer;
}

.ng-section-label {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eff6ff;
}

.ng-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.ng-checkbox-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ng-checkbox-wrap input[type='checkbox'] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

/* ── Data Table ── */
.ng-table-wrapper {
    overflow-x: auto;
}
.ng-data-table {
    width: 100%;
    border-collapse: collapse;
}
.ng-data-table thead th {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 18px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    background: #f8fafc;
    white-space: nowrap;
}
.ng-data-table tbody td {
    font-size: 13.5px;
    color: #334155;
    padding: 13px 18px;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}
.ng-data-table tbody tr:hover {
    background: #f8fafc;
}

/* ── Action Buttons ── */
.ng-actions-cell {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ng-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s;
    color: #64748b;
}
.ng-action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.ng-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.ng-action-btn.test:hover { border-color: #2563eb; color: #2563eb; }
.ng-action-btn.browse:hover { border-color: #7c3aed; color: #7c3aed; }
.ng-action-btn.edit:hover { border-color: #2563eb; color: #2563eb; }
.ng-action-btn.delete:hover { border-color: #dc2626; color: #dc2626; }

/* ── Status Pill ── */
.ng-status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}
.ng-status-pill.active {
    background: #ecfdf5;
    color: #059669;
}
.ng-status-pill.inactive {
    background: #fef2f2;
    color: #dc2626;
}

/* ── Empty & Loading States ── */
.ng-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 48px 0;
}
.ng-empty-state span {
    font-size: 14px;
    color: #94a3b8;
}

.ng-loading-area {
    display: flex;
    justify-content: center;
    padding: 48px 0;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .ng-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .ng-form-row,
    .ng-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .ng-span-2 {
        grid-column: span 1;
    }
    .ng-actions-cell {
        flex-wrap: wrap;
    }
    .ng-data-table thead th,
    .ng-data-table tbody td {
        padding: 10px 12px;
        font-size: 12.5px;
    }
}

@media (max-width: 480px) {
    .ng-card-body {
        padding: 16px;
    }
    .ng-card-header {
        padding: 14px 16px;
    }
    .ng-form-actions {
        flex-direction: column;
    }
    .ng-form-actions button {
        width: 100%;
        justify-content: center;
    }
}
