/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0a0c;
    --bg-card: #151518;
    --bg-card-hover: #1c1c20;
    --gold-primary: #d4af37;
    --gold-light: #f3e5ab;
    --gold-gradient: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    --gold-gradient-hover: linear-gradient(135deg, #aa771c, #fbf5b7, #b38728, #fcf6ba, #bf953f);
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --border-color: rgba(212, 175, 55, 0.2);
    --border-color-light: rgba(255, 255, 255, 0.05);
    --shadow-gold: 0 4px 15px rgba(212, 175, 55, 0.15);
    --shadow-dark: 0 8px 30px rgba(0, 0, 0, 0.5);
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--gold-light);
    font-weight: 600;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* --- Buttons --- */
.btn-gold {
    background: var(--gold-gradient);
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gold-gradient-hover);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-gold:hover::before {
    opacity: 1;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
    color: #000;
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline-gold:hover {
    background: rgba(212, 175, 55, 0.1);
    box-shadow: var(--shadow-gold);
}

/* --- Forms --- */
.form-control {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color-light);
    color: var(--text-main);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: var(--transition);
}

.form-control:focus {
    background-color: var(--bg-card-hover);
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
    outline: none;
    color: #fff;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
    font-size: 0.9rem;
}

/* --- Layout --- */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color-light);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 1000;
}

.sidebar-header {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-color-light);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    padding: 4px 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-main);
    border-radius: var(--radius-md);
    gap: 12px;
    font-weight: 500;
}

.nav-link i {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: var(--transition);
    width: 24px;
    text-align: center;
}

.nav-link:hover, .nav-link.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-light);
}

.nav-link:hover i, .nav-link.active i {
    color: var(--gold-primary);
}

/* Submenu Styles */
.has-submenu {
    position: relative;
    width: 100%;
}

.submenu-toggle {
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.submenu-toggle span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.submenu-toggle .arrow-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.has-submenu.open .submenu-toggle .arrow-icon {
    transform: rotate(180deg);
}

.submenu {
    list-style: none !important;
    padding: 0 !important;
    margin: 5px 0 0 40px !important;
    display: none;
}

.has-submenu.open .submenu {
    display: block !important;
}

.submenu li {
    list-style: none !important;
    margin-bottom: 2px;
}

.submenu .nav-link {
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    background: transparent !important;
    display: block !important;
}

.submenu .nav-link:hover, .submenu .nav-link.active {
    color: var(--gold-light) !important;
    background: rgba(212, 175, 55, 0.05) !important;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.page-title {
    font-size: 1.25rem;
    margin: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.user-role {
    font-size: 0.8rem;
    color: var(--gold-primary);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    border: 2px solid var(--bg-dark);
}

.content-area {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* --- Cards --- */
.gold-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-dark);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.gold-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: var(--transition);
}

.gold-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-color);
}

.gold-card:hover::before {
    opacity: 1;
}

/* --- Dashboard Stats --- */
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-details h3 {
    font-size: 1.8rem;
    margin: 0;
    color: #fff;
}

.stat-details p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Auth/Login --- */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a1a1d 0%, #0a0a0c 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-gold), var(--shadow-dark);
    text-align: center;
    position: relative;
}

.login-card::after {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: var(--radius-lg);
    background: var(--gold-gradient);
    z-index: -1;
    opacity: 0.3;
}

.login-logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #ff6b6b;
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* --- Tables --- */
.table-responsive {
    overflow-x: auto;
}

.table-gold {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-gold th {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 0 16px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color-light);
}

.table-gold td {
    padding: 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color-light);
    border-bottom: 1px solid var(--border-color-light);
}

.table-gold td:first-child {
    border-left: 1px solid var(--border-color-light);
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.table-gold td:last-child {
    border-right: 1px solid var(--border-color-light);
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.table-gold tr {
    transition: var(--transition);
}

.table-gold tr:hover td {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-gold {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.badge-success {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}
.badge-danger {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}
