/* Admin Panel Medieval Theme */

#admin_panel {
    display: flex;
    min-height: 800px;
    background: url('../graphic/background/bg-admin-ice41.jpg') repeat;
    /* Fallback or main bg */
    font-family: Verdana, Arial, sans-serif;
    color: #3b260e;
}

/* Sidebar Navigation */
#admin_sidebar {
    width: 250px;
    /* Use a game tile or solid color */
    background-color: #2b1d12;
    border-right: 3px solid #8b6c42;
    padding: 10px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure full viewport height */
}

#admin_sidebar h2 {
    color: #e8d0a9;
    font-size: 16px;
    text-align: center;
    border-bottom: 2px solid #8b6c42;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px #000;
}

.admin-nav-item {
    display: block;
    padding: 12px 15px;
    margin-bottom: 5px;
    color: #cbb286;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #4a331c;
    background: #3e2815;
    background: linear-gradient(to bottom, #4a331c, #3e2815);
    border-radius: 4px;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.admin-nav-item:hover,
.admin-nav-item.active {
    color: #fff;
    background: #6e1c1c;
    /* Crimson highlight */
    background: linear-gradient(to bottom, #8b2323, #6e1c1c);
    border-color: #d4af37;
    /* Gold border */
    transform: translateX(5px);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.admin-nav-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Main Content Area */
#admin_content {
    flex: 1;
    padding: 30px;
    /* hypothetical parchment texture */
    background-color: #f0e6d2;
    /* Fallback parchment color */
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
}

.admin-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #cfaa7d;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#admin_content h2 {
    color: #5c0909;
    border-bottom: 2px solid #cfaa7d;
    padding-bottom: 10px;
    margin-top: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 24px;
}

#admin_content h3 {
    color: #5c0909;
    margin-top: 15px;
    margin-bottom: 10px;
}

.theme-modern #admin_content h3 {
    color: #5c0909 !important;
    text-shadow: none !important;
}

.theme-modern #admin_content .admin-alert.error h3 {
    color: #a94442 !important;
}

.theme-modern #admin_content .admin-alert.info h3 {
    color: #31708f !important;
}


/* Form & Table Styling overrides for Admin Panel */
#admin_panel .vis {
    border: 1px solid #8b6c42;
    border-collapse: separate;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    width: 100%;
}

#admin_panel .vis th {
    background: #4a331c url('../graphic/background/bg-admin-ice41.jpg');
    color: #e8d0a9;
    padding: 10px;
    border-bottom: 1px solid #d4af37;
}

#admin_panel .vis td {
    background: rgba(245, 237, 220, 0.9);
    padding: 8px;
    border-bottom: 1px solid #dcd0b8;
}

#admin_panel .vis tr:nth-child(even) td {
    background: rgba(235, 225, 205, 0.9);
}

#admin_panel input[type="text"],
#admin_panel input[type="password"],
#admin_panel textarea,
#admin_panel select {
    border: 1px solid #8b6c42;
    background: #fdfaf5;
    padding: 6px;
    border-radius: 3px;
    color: #3b260e;
    font-family: inherit;
}

#admin_panel input[type="submit"],
#admin_panel .btn {
    background: #6e1c1c;
    /* Crimson */
    color: white;
    border: 1px solid #4a0d0d;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#admin_panel input[type="submit"]:hover,
#admin_panel .btn:hover {
    background: #8b2323;
    box-shadow: 0 0 8px rgba(139, 35, 35, 0.6);
}

/* Stat Cards for Dashboard */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-box {
    background: linear-gradient(135deg, #4a331c, #2b1d12);
    color: #e8d0a9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #8b6c42;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.stat-box .count {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px #d4af37;
    margin-bottom: 5px;
}

.stat-box .label {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
}

/* Alert Styling */
.admin-alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 5px solid;
}

.admin-alert.info {
    background-color: #d9edf7;
    border-color: #31708f;
    color: #31708f;
}

.admin-alert.error {
    background-color: #f2dede;
    border-color: #a94442;
    color: #a94442;
}

/* Language Selector Dropdown */
.lang-selector { position: relative; display: inline-block; font-family: Arial, Tahoma, sans-serif; font-size: 11px; z-index: 1000; text-align: left; }
.lang-current { background-color: #fff8e2; border: 1px solid #cbb286; padding: 4px 8px; cursor: pointer; display: flex; align-items: center; gap: 5px; border-radius: 2px; color: #4f3b14; font-weight: bold; }
.lang-current:hover { background-color: #f4e4bc; }
.lang-dropdown { display: none; position: absolute; left: 0; background-color: #fff8e2; border: 1px solid #cbb286; min-width: 140px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
.lang-item { padding: 5px 8px; display: flex; align-items: center; gap: 6px; text-decoration: none; color: #005470; border-bottom: 1px solid #e1d5b8; }
.lang-item:last-child { border-bottom: none; }
.lang-item:hover, .lang-item.active { background-color: #f4e4bc; }
.lang-check { margin-left: auto; color: #217a21; font-weight: bold; }