/*
 * File: D:\shadowed-realms-mobile\ShadowedRealmsMobile\src\server\ShadowedRealms.Admin\wwwroot\css\admin-theme.css
 * Created: 2025-10-30
 * Last Modified: 2025-10-30
 * Description: Custom styling for Shadowed Realms Admin Dashboard - Medieval fantasy theme with modern UX
 * Last Edit Notes: Professional admin interface with game-themed colors, responsive design, and accessibility
 */

/* ==================== ROOT VARIABLES ==================== */
:root {
    --sr-primary: #8B4513; /* Saddle brown - medieval */
    --sr-secondary: #DAA520; /* Golden rod - royal gold */
    --sr-success: #228B22; /* Forest green */
    --sr-danger: #DC143C; /* Crimson */
    --sr-warning: #FF8C00; /* Dark orange */
    --sr-info: #4682B4; /* Steel blue */

    --sr-dark-bg: #1a1a1a; /* Main dark background */
    --sr-darker-bg: #0d1117; /* Darker sections */
    --sr-card-bg: #21262d; /* Card backgrounds */
    --sr-border: #30363d; /* Borders */

    --sr-text-primary: #f0f6fc; /* Primary text */
    --sr-text-secondary: #8b949e; /* Secondary text */
    --sr-text-muted: #656d76; /* Muted text */

    --sr-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --sr-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

/* ==================== BASE STYLES ==================== */
.admin-body {
    background-color: var(--sr-dark-bg);
    font-family: var(--font-body);
    color: var(--sr-text-primary);
    padding-top: 76px; /* Account for fixed navbar */
}

/* ==================== NAVIGATION ==================== */
.admin-navbar {
    background: linear-gradient(135deg, var(--sr-darker-bg) 0%, var(--sr-dark-bg) 100%);
    border-bottom: 2px solid var(--sr-secondary);
    backdrop-filter: blur(10px);
    box-shadow: var(--sr-shadow);
    height: 76px;
}

    .admin-navbar .navbar-brand {
        font-family: var(--font-heading);
        font-weight: 600;
        color: var(--sr-secondary) !important;
        font-size: 1.5rem;
    }

    .admin-navbar .brand-icon {
        color: var(--sr-secondary);
        font-size: 1.8rem;
    }

    .admin-navbar .brand-subtitle {
        font-size: 0.9rem;
        color: var(--sr-text-secondary);
        font-weight: 300;
    }

    .admin-navbar .nav-link {
        color: var(--sr-text-primary) !important;
        font-weight: 500;
        padding: 0.75rem 1rem !important;
        border-radius: 0.375rem;
        transition: all 0.3s ease;
    }

        .admin-navbar .nav-link:hover,
        .admin-navbar .nav-link.active {
            background-color: rgba(218, 165, 32, 0.1);
            color: var(--sr-secondary) !important;
            transform: translateY(-1px);
        }

.admin-dropdown {
    background-color: var(--sr-card-bg);
    border: 1px solid var(--sr-border);
    border-radius: 0.5rem;
    box-shadow: var(--sr-shadow-lg);
    min-width: 250px;
}

    .admin-dropdown .dropdown-item {
        color: var(--sr-text-primary);
        padding: 0.75rem 1rem;
    }

        .admin-dropdown .dropdown-item:hover {
            background-color: rgba(218, 165, 32, 0.1);
            color: var(--sr-secondary);
        }

.system-health-indicator {
    cursor: default;
}

/* ==================== MAIN CONTENT ==================== */
.admin-main {
    min-height: calc(100vh - 140px); /* Account for navbar and footer */
    padding-bottom: 2rem;
}

.admin-breadcrumb {
    background-color: transparent;
    padding: 0;
}

    .admin-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        content: "›";
        color: var(--sr-text-secondary);
    }

    .admin-breadcrumb a {
        color: var(--sr-secondary);
        text-decoration: none;
    }

        .admin-breadcrumb a:hover {
            color: var(--sr-text-primary);
        }

/* ==================== CARDS & PANELS ==================== */
.admin-card {
    background-color: var(--sr-card-bg);
    border: 1px solid var(--sr-border);
    border-radius: 0.75rem;
    box-shadow: var(--sr-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.admin-card-header {
    background: linear-gradient(135deg, var(--sr-primary) 0%, var(--sr-secondary) 100%);
    color: white;
    border-bottom: none;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    padding: 1.25rem;
    font-weight: 600;
}

.admin-card-body {
    padding: 1.5rem;
}

/* ==================== STATS CARDS ==================== */
.stats-card {
    background: linear-gradient(135deg, var(--sr-card-bg) 0%, rgba(33, 38, 45, 0.8) 100%);
    border: 1px solid var(--sr-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .stats-card::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100px;
        height: 100px;
        background: linear-gradient(135deg, var(--sr-secondary), var(--sr-primary));
        opacity: 0.1;
        border-radius: 50%;
        transform: translate(30px, -30px);
    }

    .stats-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--sr-shadow-lg);
        border-color: var(--sr-secondary);
    }

.stats-card-icon {
    font-size: 2.5rem;
    color: var(--sr-secondary);
    margin-bottom: 1rem;
}

.stats-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sr-text-primary);
    margin-bottom: 0.5rem;
}

.stats-card-label {
    font-size: 0.9rem;
    color: var(--sr-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-card-change {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

    .stats-card-change.positive {
        color: var(--sr-success);
    }

    .stats-card-change.negative {
        color: var(--sr-danger);
    }

/* ==================== ACTIVITY FEED ==================== */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    border-left: 3px solid var(--sr-border);
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: rgba(33, 38, 45, 0.5);
    border-radius: 0 0.5rem 0.5rem 0;
    transition: all 0.3s ease;
}

    .activity-item:hover {
        border-left-color: var(--sr-secondary);
        background-color: rgba(33, 38, 45, 0.8);
    }

    .activity-item.severity-warning {
        border-left-color: var(--sr-warning);
    }

    .activity-item.severity-critical {
        border-left-color: var(--sr-danger);
    }

    .activity-item.severity-info {
        border-left-color: var(--sr-info);
    }

.activity-timestamp {
    font-size: 0.8rem;
    color: var(--sr-text-muted);
}

.activity-type {
    font-size: 0.85rem;
    color: var(--sr-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== SYSTEM HEALTH ==================== */
.health-indicator {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

    .health-indicator.healthy {
        background-color: rgba(34, 139, 34, 0.1);
        border: 1px solid rgba(34, 139, 34, 0.3);
        color: var(--sr-success);
    }

    .health-indicator.warning {
        background-color: rgba(255, 140, 0, 0.1);
        border: 1px solid rgba(255, 140, 0, 0.3);
        color: var(--sr-warning);
    }

    .health-indicator.critical {
        background-color: rgba(220, 20, 60, 0.1);
        border: 1px solid rgba(220, 20, 60, 0.3);
        color: var(--sr-danger);
    }

    .health-indicator i {
        margin-right: 0.5rem;
    }

/* ==================== TABLES ==================== */
.admin-table {
    background-color: var(--sr-card-bg);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--sr-shadow);
}

    .admin-table table {
        margin-bottom: 0;
    }

    .admin-table thead {
        background: linear-gradient(135deg, var(--sr-primary) 0%, var(--sr-secondary) 100%);
    }

        .admin-table thead th {
            color: white;
            font-weight: 600;
            border: none;
            padding: 1rem;
        }

    .admin-table tbody tr {
        border-bottom: 1px solid var(--sr-border);
    }

        .admin-table tbody tr:hover {
            background-color: rgba(218, 165, 32, 0.05);
        }

    .admin-table tbody td {
        padding: 1rem;
        vertical-align: middle;
    }

/* ==================== BUTTONS ==================== */
.btn-admin-primary {
    background: linear-gradient(135deg, var(--sr-primary) 0%, var(--sr-secondary) 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

    .btn-admin-primary:hover {
        transform: translateY(-1px);
        box-shadow: var(--sr-shadow);
        color: white;
    }

.btn-admin-secondary {
    background-color: transparent;
    border: 2px solid var(--sr-secondary);
    color: var(--sr-secondary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

    .btn-admin-secondary:hover {
        background-color: var(--sr-secondary);
        color: var(--sr-dark-bg);
    }

/* ==================== ALERTS ==================== */
.admin-alert {
    border-radius: 0.75rem;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

    .admin-alert.alert-warning {
        background-color: rgba(255, 140, 0, 0.1);
        border-left: 4px solid var(--sr-warning);
        color: var(--sr-warning);
    }

    .admin-alert.alert-danger {
        background-color: rgba(220, 20, 60, 0.1);
        border-left: 4px solid var(--sr-danger);
        color: var(--sr-danger);
    }

    .admin-alert.alert-success {
        background-color: rgba(34, 139, 34, 0.1);
        border-left: 4px solid var(--sr-success);
        color: var(--sr-success);
    }

    .admin-alert.alert-info {
        background-color: rgba(70, 130, 180, 0.1);
        border-left: 4px solid var(--sr-info);
        color: var(--sr-info);
    }

/* ==================== FORMS ==================== */
.form-control, .form-select {
    background-color: var(--sr-darker-bg);
    border: 1px solid var(--sr-border);
    color: var(--sr-text-primary);
    border-radius: 0.5rem;
}

    .form-control:focus, .form-select:focus {
        background-color: var(--sr-darker-bg);
        border-color: var(--sr-secondary);
        color: var(--sr-text-primary);
        box-shadow: 0 0 0 0.2rem rgba(218, 165, 32, 0.25);
    }

.form-label {
    color: var(--sr-text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ==================== FOOTER ==================== */
.admin-footer {
    background-color: var(--sr-darker-bg);
    border-top: 1px solid var(--sr-border);
    margin-top: auto;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .admin-navbar .brand-subtitle {
        display: none;
    }

    .stats-card {
        margin-bottom: 1rem;
    }

    .admin-card-body {
        padding: 1rem;
    }

    .stats-card-value {
        font-size: 1.5rem;
    }

    .stats-card-icon {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .admin-main {
        padding: 1rem 0;
    }

    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ==================== CHART CONTAINERS ==================== */
.chart-container {
    position: relative;
    background-color: var(--sr-card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--sr-border);
    box-shadow: var(--sr-shadow);
}

    .chart-container canvas {
        max-width: 100% !important;
        height: auto !important;
    }

/* ==================== LOADING STATES ==================== */
.loading-placeholder {
    background: linear-gradient(90deg, var(--sr-card-bg) 25%, rgba(33, 38, 45, 0.5) 50%, var(--sr-card-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.375rem;
    height: 20px;
    margin-bottom: 0.5rem;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}
