/* src/assets/styles/main.css */

/* --- 1. VARIABLES & RESET --- */
:root {
    --primary-color: #004b87;
    --primary-hover: #003662;
    --secondary-bg: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #e0e0e0;

    /* Sidebar Specifics */
    --sidebar-bg: #2c3e50;
    --sidebar-dark: #1a252f;
    --sidebar-text: #bdc3c7;
    --sidebar-active: #34495e;

    /* Status Colors */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;

    /* Spacing & Effects */
    --radius-sm: 4px;
    --radius-md: 8px;
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 6px 12px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-bg);
    color: var(--text-main);
}

.hidden {
    display: none !important;
    visibility: hidden !important;
}

/* --- 2. LAYOUT --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    margin-left: 260px;
    /* Matches nav.css width */
    flex: 1;
    background-color: #f4f6f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    padding: 20px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

/* --- 3. SIDEBAR COMPONENTS (Global Extensions) --- */
.context-selector select {
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: var(--radius-sm);
    width: 100%;
    margin-top: 10px;
    font-size: 0.9rem;
}

.context-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.role-tag {
    background-color: var(--primary-color);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.screen-list {
    display: none;
    padding-left: 10px;
    margin-bottom: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 10px;
}

.screen-list.active {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.screen-item {
    padding: 10px 15px;
    color: #bdc3c7;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-radius: 0 4px 4px 0;
    margin-bottom: 2px;
}

.screen-item:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 20px;
}

.screen-item.active {
    color: white;
    background-color: var(--primary-color);
    border-left: 3px solid #3498db;
    font-weight: 600;
}

.logout-btn {
    background-color: transparent;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    width: 100%;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background-color: var(--danger-color);
    color: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* --- 4. TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    background: var(--success-color);
    border-left: 5px solid #1e7e34;
}

.toast.error {
    background: var(--danger-color);
    border-left: 5px solid #bd2130;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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