/**
 * AuraRP Control Panel Styles
 * Based on Prodigy RP 2.5 design
 * Primary Color: #006eaf
 * NO backdrop-filter or blur effects
 */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

/* Root Variables */
:root {
    --primary-color: #006eaf;
    --primary-hover: #005a8f;
    --bg-dark: #0d0d0d;
    --bg-card: #1a1a1a;
    --bg-darker: #0a0a0a;
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0zNiAxOGMzLjMxNCAwIDYgMi42ODYgNiA2cy0yLjY4NiA2LTYgNi02LTIuNjg2LTYtNiAyLjY4Ni02IDYtNnptMCAyYy0yLjIxIDAtNCA0Ljc5LTQgNHM0LjEgNCA0IDRjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTR6bS0xMiAyYzIuMjEgMCA0IDEuNzkgNCA0cy0xLjc5IDQtNCA0LTQtMS43OS00LTQgMS43OS00IDQtNHptMjQgMGMyLjIxIDAgNCAxLjc5IDQgNHMtMS43OSA0LTQgNC00LTEuNzktNC00IDEuNzktNCA0LTR6IiBmaWxsPSIjMDA2ZWFmIiBvcGFjaXR5PSIuMDUiLz48L2c+PC9zdmc+');
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

/* Typography */
.font-oswald {
    font-family: 'Oswald', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
}

/* Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    width: 100%;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.95);
}

.navbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.navbar-logo img {
    height: 2.5rem;
    transition: transform 0.3s;
}

.navbar-logo:hover img {
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.navbar-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
}

.nav-btn i {
    font-size: 1rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-btn.active {
    background: rgba(0, 110, 175, 0.2);
    color: var(--primary-color);
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: var(--primary-color);
}

.nav-btn-primary {
    background: var(--primary-color);
    color: white;
}

.nav-btn-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.nav-btn-admin {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-btn-admin:hover {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

.nav-divider {
    width: 1px;
    height: 2rem;
    background: var(--border-color);
    margin: 0 0.5rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 110, 175, 0.5);
}

.user-menu-trigger i:first-child {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: rgba(26, 26, 26, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.user-menu-item.logout {
    color: #ef4444;
}

.user-menu-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.25rem 0;
}

/* Hero Section */
.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
    position: relative;
}

.hero-content {
    max-width: 42rem;
    position: relative;
    z-index: 1;
}

.hero-logo-container {
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-logo {
    width: 7rem;
    height: 7rem;
    filter: drop-shadow(0 8px 24px rgba(0, 110, 175, 0.5));
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero .highlight {
    background: linear-gradient(135deg, #0aa4ff, #006eaf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: rgba(20, 107, 197, 0.58);
    border: 1px solid rgba(0, 173, 255, 0.58);
    color: white;
    font-weight: 700;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 110, 175, 0.3);
    font-size: 1rem;
}

.btn-large:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 110, 175, 0.5);
    background: rgba(20, 107, 197, 0.7);
}

.btn-large.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-large.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

/* Cards */
.card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.card:hover {
    border-color: rgba(0, 110, 175, 0.5);
}

/* Section Titles */
.section-title {
    font-size: 3rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 900px;
    margin: 0 auto;
}

/* Subscription Cards */
.subscription-card {
    position: relative;
    min-height: 700px;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s;
    cursor: default;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.subscription-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.subscription-card-bg {
    position: absolute;
    inset: 0;
}

.subscription-card-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 2rem 2rem 2rem;
}

.tier-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.tier-icon {
    width: 5rem;
    height: 5rem;
    min-width: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
}

.tier-icon i {
    font-size: 2.5rem;
    color: white;
    opacity: 0.9;
}

.tier-name {
    font-size: 2.75rem;
    color: white;
    letter-spacing: 0.05em;
    font-weight: 700;
    line-height: 1;
    margin: 0;
}

.tier-features {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 2.5rem;
}

.tier-feature {
    color: white;
    font-size: 0.9375rem;
    line-height: 1.5;
    padding: 0;
    margin: 0;
}

.tier-bottom {
    margin-top: auto;
}

.tier-price-section {
    margin-bottom: 1.5rem;
}

.tier-price-label {
    color: white;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    font-weight: 600;
    opacity: 0.8;
}

.tier-price {
    font-size: 3.25rem;
    color: white;
    margin: 0;
    font-weight: 700;
    line-height: 1;
}

.subscribe-btn {
    width: 100%;
    padding: 0.875rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: capitalize;
}

.subscribe-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

/* Tables */
.table-container {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
}

.table-header {
    display: grid;
    padding: 1rem 1.5rem;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.table-row {
    display: grid;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.table-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid;
}

.badge-pending {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
    border-color: rgba(234, 179, 8, 0.4);
}

.badge-approved {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.4);
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.badge-open {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.4);
}

.badge-closed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 600;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
}

/* Fix: ensure native dropdown option text is readable (prevents white-on-white) */
.form-select option,
select.form-input option,
select.form-input optgroup,
.form-textarea option {
    /* Dropdown list items should use dark text on light background so they're readable
       across browsers where the option inherits the select's white color. */
    color: #111 !important;
    background-color: #ffffff !important;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(0, 110, 175, 0.5);
}

.form-textarea {
    min-height: 200px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Loading Spinner */
.spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar-inner {
        flex-wrap: wrap;
    }
    
    .navbar-links {
        position: fixed;
        top: 5rem;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(26, 26, 26, 0.98);
        border: 1px solid var(--border-color);
        border-radius: 0 0 1rem 1rem;
        padding: 1rem;
        gap: 0.5rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
    }
    
    .navbar-links.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-btn {
        width: 100%;
        justify-content: flex-start;
    }
    
    .nav-divider {
        width: 100%;
        height: 1px;
        margin: 0.5rem 0;
    }
    
    .user-menu {
        width: 100%;
    }
    
    .user-menu-trigger {
        width: 100%;
        justify-content: space-between;
    }
    
    .user-menu-dropdown {
        position: static;
        margin-top: 0.5rem;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.3);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-logo {
        width: 5rem;
        height: 5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .table-header,
    .table-row {
        font-size: 0.75rem;
        padding: 0.75rem 1rem;
    }
}

/* Admin Dashboard Styles */
.admin-nav-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
    cursor: pointer;
}

.admin-nav-card i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.admin-nav-card span {
    font-size: 0.875rem;
    font-weight: 600;
}

.admin-nav-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 110, 175, 0.5);
    background: rgba(26, 26, 26, 1);
    box-shadow: 0 4px 12px rgba(0, 110, 175, 0.2);
}

.admin-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    min-width: 1.25rem;
    text-align: center;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 110, 175, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 2rem;
    margin: 0 0 0.25rem 0;
    color: white;
    font-weight: 700;
}

.stat-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 110, 175, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 110, 175, 0.7);
}
