/* =========================================
   Orbitview Admin Universal Styles
   ========================================= */

body {
    background: #050505;
    color: #fff;
    margin: 0;
    display: flex;
    min-height: 100vh;
    font-family: 'Open Sans', sans-serif;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #0a0a0a;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 30px 0;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 0 30px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 3px;
}

.logo-text span {
    color: #ff0000;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    color: #aaa;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.nav-links li a i {
    margin-right: 15px;
    width: 20px;
    font-size: 1.1rem;
    text-align: center;
}

.nav-links li a.active,
.nav-links li a:hover {
    color: #fff;
    background: rgba(255, 0, 0, 0.1);
    border-left: 4px solid #ff0000;
}

.sidebar-footer {
    padding: 30px 30px 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.logout-btn {
    color: #ff4444;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    padding: 40px;
    width: calc(100% - 280px);
    transition: all 0.3s ease;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.top-nav h1 {
    color: #fff;
    margin: 0;
    font-size: 1.8rem;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #222;
    overflow: hidden;
    border: 2px solid #ff0000;
}

.admin-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cards & Forms */
.card,
.form-card,
.profile-card {
    background: #111;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-card {
    background: #111;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #ff0000;
}

.stat-card i {
    font-size: 2rem;
    color: #ff0000;
    margin-bottom: 20px;
}

.stat-card h3 {
    color: #aaa;
    font-size: 0.9rem;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

/* Tables */
.table-container {
    background: #111;
    border-radius: 20px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 600px;
    /* Ensure table doesn't squash too much */
}

th {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    color: #aaa;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

td {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.9rem;
}

tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.status-pill {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-new {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
}

/* Quick Actions */
.quick-actions {
    margin-top: 50px;
}

.quick-actions h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
    border-left: 4px solid #ff0000;
    padding-left: 15px;
}

.action-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.5);
}

.btn-secondary {
    background: #1a1a1a;
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: #222;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #aaa;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    padding: 12px;
    color: #fff;
    border-radius: 8px;
    box-sizing: border-box;
}

.btn-add,
.btn-save {
    background: #ff0000;
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: inline-block;
}

/* =========================================
   LOGIN PAGE STYLES
   ========================================= */

body.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    min-height: 100vh;
    margin: 0;
}

.login-card {
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
    text-align: center;
    position: relative;
    z-index: 10;
}


.login-card h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.login-card .logo-placeholder {
    margin-bottom: 20px;
}

.login-card .form-group {
    text-align: left;
}

.login-card .btn-login {
    width: 100%;
    padding: 15px;
    background: #ff0000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
    font-size: 1rem;
    text-transform: uppercase;
}

.login-card .btn-login:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.back-to-site {
    margin-top: 25px;
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
}

.back-to-site:hover {
    color: #fff;
}

.error-msg {
    color: #ff4444;
    background: rgba(255, 0, 0, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.success-msg {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

/* =========================================
   RESPONSIVE (TABLET & MOBILE)
   ========================================= */

/* Tablet (Portrait) */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
        align-items: center;
    }

    .sidebar-header,
    .sidebar-footer .logout-btn span,
    .nav-links span {
        display: none;
    }

    .sidebar-header {
        padding: 20px 0;
        display: block;
        /* Show reduced logo? */
    }

    .logo-text {
        font-size: 12px;
        letter-spacing: 1px;
        text-align: center;
    }

    .nav-links li a {
        justify-content: center;
        padding: 20px;
    }

    .nav-links li a i {
        margin: 0;
        font-size: 1.4rem;
    }

    .sidebar-footer {
        padding: 20px;
        display: flex;
        justify-content: center;
    }

    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
        padding: 30px;
    }
}

/* Mobile (Phablet & Phone) */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-header {
        display: block;
        padding: 0;
        margin: 0;
        border: none;
    }

    .logo-text {
        font-size: 18px;
    }

    /* Hide nav links in top bar, create a bottom nav instead or just scrollable top? 
       Let's stick to a simple scrollable horizontal nav for now, or just hide labels. */

    .nav-links {
        display: none;
        /* Hide standard nav */
        /* OPTIONAL: We could make a bottom nav bar here */
    }

    .sidebar-footer {
        display: none;
    }

    /* Create a Bottom Navigation Bar for Mobile */
    .mobile-nav {
        display: flex !important;
        /* Force show */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #0a0a0a;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 2000;
        justify-content: space-around;
        padding: 10px 0;
    }

    .mobile-nav-item {
        color: #aaa;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.7rem;
    }

    .mobile-nav-item i {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }

    .mobile-nav-item.active {
        color: #ff0000;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
        padding-bottom: 80px;
        /* Space for bottom nav */
    }

    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .action-btn {
        width: 100%;
    }

    .settings-container {
        grid-template-columns: 1fr;
    }
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-success {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.05);
    border-color: rgba(46, 204, 113, 0.2);
}

.alert-error {
    color: #ff4444;
    background: rgba(255, 0, 0, 0.05);
    border-color: rgba(255, 0, 0, 0.2);
}

 