/* =========================================
   TIBIAME CLONE - ADMIN CSS
   Admin panel styles for controlling all menu
   and site navigation elements
   ========================================= */

/* =========================================
   ADMIN PANEL CONTAINER
   ========================================= */
.admin-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #003456 0%, #005580 100%);
    color: #ffffff;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    font-family: 'Verdana', sans-serif;
    font-size: 12px;
}

.admin-panel.open {
    transform: translateX(0);
}

/* =========================================
   ADMIN TOGGLE BUTTON
   ========================================= */
.admin-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: var(--accent-blue);
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    z-index: 10000;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.admin-toggle:hover {
    background: var(--button-hover);
    transform: rotate(90deg);
}

.admin-toggle:active {
    transform: scale(0.95);
}

.admin-toggle:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* =========================================
   ADMIN HEADER
   ========================================= */
.admin-header {
    padding: 20px;
    border-bottom: 1px solid #4f80b1;
    background: rgba(0, 0, 0, 0.2);
}

.admin-header h2 {
    margin: 0;
    font-size: 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header h2::before {
    content: '⚙';
    font-size: 20px;
}

.admin-status {
    margin-top: 8px;
    font-size: 11px;
    color: #408ae4;
    display: flex;
    justify-content: space-between;
}

.admin-status span {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =========================================
   ADMIN MENU
   ========================================= */
.admin-menu {
    padding: 15px;
    overflow-y: auto;
    height: calc(100vh - 120px);
}

.admin-menu-section {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.admin-menu-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.admin-menu-section h3 {
    font-size: 13px;
    color: #408ae4;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   ADMIN MENU ITEMS
   ========================================= */
.admin-menu-item {
    display: block;
    padding: 10px 12px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: left;
}

.admin-menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #408ae4;
    padding-left: 18px;
    color: #ffffff;
    text-decoration: none;
}

.admin-menu-item.active {
    background: rgba(64, 138, 228, 0.3);
    border-color: #408ae4;
    color: #ffffff;
}

.admin-menu-item:focus-visible {
    outline: 2px solid #408ae4;
    outline-offset: 2px;
}

.admin-menu-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* =========================================
   ADMIN ACTION BUTTONS
   ========================================= */
.admin-action {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    background: var(--bg-medium);
    color: #ffffff;
    border: 1px solid #7EA7CB;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
}

.admin-action:hover {
    background: var(--button-hover);
    border-color: #408ae4;
}

.admin-action:active {
    transform: scale(0.98);
}

.admin-action:focus-visible {
    outline: 2px solid #408ae4;
    outline-offset: 2px;
}

.admin-action.danger {
    background: #8B0000;
    border-color: #8B0000;
}

.admin-action.danger:hover {
    background: #A00000;
}

.admin-action.success {
    background: #006400;
    border-color: #006400;
}

.admin-action.success:hover {
    background: #008000;
}

/* =========================================
   ADMIN CONTROLS - TOGGLES & SELECTS
   ========================================= */
.admin-control-group {
    margin: 15px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-control-group label {
    display: block;
    font-size: 11px;
    color: #408ae4;
    margin-bottom: 8px;
    font-weight: bold;
}

.admin-control-group select,
.admin-control-group input[type="text"],
.admin-control-group input[type="number"] {
    width: 100%;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #4f80b1;
    border-radius: 4px;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    box-sizing: border-box;
}

.admin-control-group select:focus,
.admin-control-group input:focus {
    outline: 2px solid #408ae4;
    outline-offset: 1px;
}

.admin-control-group input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #408ae4;
}

/* =========================================
   ADMIN STATS GRID
   ========================================= */
.admin-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.admin-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 10px;
    text-align: center;
}

.admin-stat-card .stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #408ae4;
    display: block;
}

.admin-stat-card .stat-label {
    font-size: 10px;
    color: #cccccc;
    text-transform: uppercase;
}

/* =========================================
   ADMIN ALERTS & MESSAGES
   ========================================= */
.admin-alert {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 11px;
    display: none;
}

.admin-alert.show {
    display: block;
}

.admin-alert.success {
    background: rgba(0, 128, 0, 0.2);
    border: 1px solid #006400;
    color: #00ff00;
}

.admin-alert.error {
    background: rgba(139, 0, 0, 0.2);
    border: 1px solid #8B0000;
    color: #ff6666;
}

.admin-alert.info {
    background: rgba(64, 138, 228, 0.2);
    border: 1px solid #408ae4;
    color: #408ae4;
}

.admin-alert.warning {
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid #FF8C00;
    color: #FFA500;
}

/* =========================================
   ADMIN CLOSE BUTTON
   ========================================= */
.admin-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.admin-close:hover {
    color: #408ae4;
}

/* =========================================
   ADMIN OVERLAY (when panel is open)
   ========================================= */
.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.admin-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   MOBILE ADMIN ADJUSTMENTS
   ========================================= */
@media (max-width: 768px) {
    .admin-panel {
        width: 100vw;
        max-width: 320px;
    }

    .admin-toggle {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .admin-menu {
        height: calc(100vh - 100px);
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ADMIN PRINT HIDE
   ========================================= */
@media print {
    .admin-panel,
    .admin-toggle,
    .admin-overlay {
        display: none !important;
    }
}