/* ==========================================================================
   AKS-Pro Admin Panel — Brand Theme
   Primary Blue: #1B3A8F   Accent Orange: #E8783A
   ========================================================================== */

:root {
    --blue-deep: #0F1F4E;
    --blue-primary: #1B3A8F;
    --blue-light: #2A4FAD;
    --orange-primary: #E8783A;
    --orange-light: #F09A5E;
    --orange-dark: #C85E20;
    --dark: #0A0F1F;
    --gray-900: #1A1F2E;
    --gray-100: #F4F5F7;
    --gray-200: #E8EAED;
}

body {
    background-color: var(--gray-100);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar-brand-custom {
    background: linear-gradient(135deg, var(--dark) 0%, var(--blue-deep) 100%);
    border-bottom: 2px solid var(--orange-primary);
}

.navbar-brand-custom .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.3px;
}

.navbar-brand-custom .navbar-brand img {
    margin-right: 0.5rem;
}

.navbar-brand-custom .nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar-brand-custom .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.navbar-brand-custom .nav-link.active {
    color: #fff;
    background: rgba(232, 120, 58, 0.2);
    border-bottom: 2px solid var(--orange-primary);
}

.navbar-brand-custom .nav-link i {
    opacity: 0.8;
}

.navbar-brand-custom .nav-link.active i {
    opacity: 1;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
}

/* ==========================================================================
   Stat Cards (Dashboard)
   ========================================================================== */

.stat-card {
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-primary), var(--orange-primary));
    opacity: 0;
    transition: opacity 0.2s;
}

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

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .display-6 {
    font-weight: 800;
    font-size: 2rem;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6B7280;
    white-space: nowrap;
    border-bottom-width: 2px;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(27, 58, 143, 0.03);
}

.table a {
    color: var(--blue-primary);
    text-decoration: none;
    font-weight: 500;
}

.table a:hover {
    color: var(--orange-primary);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge-online {
    background-color: #059669;
}

.badge-offline {
    background-color: #9CA3AF;
}

.badge-pending {
    background-color: var(--orange-primary);
    color: #fff;
}

.badge-success {
    background-color: #059669;
}

.badge-failed {
    background-color: #DC2626;
}

.tunnel-active {
    color: #059669;
    font-weight: 600;
}

.tunnel-inactive {
    color: #9CA3AF;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
    border: none;
    font-weight: 600;
    border-radius: 8px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--blue-light), var(--blue-primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 58, 143, 0.25);
}

.btn-warning {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--orange-light), var(--orange-primary));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 120, 58, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #047857);
    border: none;
    font-weight: 600;
    border-radius: 8px;
}

.btn-outline-primary {
    color: var(--blue-primary);
    border-color: var(--blue-primary);
    border-radius: 8px;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
}

.btn-action {
    padding: 0.3rem 0.55rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control:focus,
.form-select:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 0.2rem rgba(27, 58, 143, 0.15);
}

/* ==========================================================================
   Login Page
   ========================================================================== */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--blue-deep) 50%, #0D2B5E 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 60%;
    height: 160%;
    background: radial-gradient(ellipse, rgba(232, 120, 58, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-card .card-body {
    padding: 2.5rem !important;
}

.login-logo {
    width: 80px;
    height: auto;
    margin-bottom: 0.5rem;
}

.login-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--dark);
}

.login-subtitle {
    color: #6B7280;
    font-size: 0.9rem;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ==========================================================================
   Page Headers
   ========================================================================== */

h4 {
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.3px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.admin-footer {
    color: #9CA3AF;
    font-size: 0.8rem;
}

.admin-footer img {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.admin-footer:hover img {
    opacity: 0.8;
}

/* ==========================================================================
   Scrollbar (Webkit)
   ========================================================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}
