@import 'admin_sidebar.css';

:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --sidebar-bg: rgba(15, 23, 42, 0.95);
    /* Sidebar specific */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-hover: #0ea5e9;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --border-color: rgba(148, 163, 184, 0.1);
}

[data-theme="light"] {
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.85);
    --sidebar-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #0284c7;
    --accent-hover: #0369a1;
    --border-color: rgba(0, 0, 0, 0.1);
    --input-bg: #ffffff;
}

:root {
    /* Fallback/Default Dark Theme Vars continued if needed, but adding input-bg to root for dark default */
    --input-bg: rgba(15, 23, 42, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    background-image:
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #3b82f6);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand span {
    color: var(--accent-color);
}

.nav-brand .app-logo {
    height: 50px;
    width: auto;
    transition: height 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badge */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success-color);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.badge-role {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-color);
}

/* Timeline/Log Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 1.5rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
}

.timeline-item:last-child {
    border-left: 2px solid transparent;
}

.timeline-dot {
    position: absolute;
    left: -2.1rem;
    /* Adjusted for border+padding */
    top: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--accent-color);
    border: 2px solid var(--bg-color);
}

.timeline-content {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.stage_media img,
.stage_media video {
    max-width: 100px;
    height: auto;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.stage_media img:hover {
    transform: scale(1.1);
}

/* Utilities */
.text-right {
    text-align: right;
}

.mt-4 {
    margin-top: 1rem;
}

.flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .glass-card {
        padding: 1.25rem;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .nav-container {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }

    .nav-brand {
        margin-bottom: 1rem;
        width: 100%;
        justify-content: center;
    }

    .nav-brand .app-logo {
        height: 70px;
        /* Larger logo on mobile */
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        width: 100%;
    }

    .nav-links a {
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 0.5rem;
        font-size: 0.9rem;
        flex: 1 1 auto;
        /* Grow to fill space */
        text-align: center;
        border: 1px solid var(--border-color);
    }

    .btn-sm {
        padding: 0.5rem 1rem;
        /* Larger touch target */
    }

    /* Stack tables on very small screens if needed, 
       but for data density horizontal scroll is mostly preferred. 
       .table-responsive handles scroll. */

    .timeline {
        padding-left: 1rem;
    }

    .timeline-dot {
        left: -1.35rem;
        width: 0.75rem;
        height: 0.75rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: rotate(15deg);
}

@media (max-width: 768px) {
    .nav-links {
        justify-content: center;
        width: 100%;
        gap: 0.5rem;
    }

    /* Make theme button visible and accessible on mobile */
    .theme-toggle-btn {
        margin: 0.5rem auto;
        /* Center it */
        width: 100%;
        /* Full width touch target in row */
        max-width: 40px;
    }
}

.theme-icon-sun {
    color: #ffd700;
    /* Gold/Yellow */
}

/* Sidebar Toggle Visibility - Direct override */
#sidebarToggle {
    display: none;
}

@media (max-width: 576px) {
    #sidebarToggle {
        display: block !important;
    }
}