/* Global Styles & Variables - Dark Modern Theme */
:root {
    --bg-dark: #0f0f1a;
    --bg-card: #1a1b2e;
    --primary-color: #6c5ce7;
    /* Purple accent from ref */
    --primary-gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --secondary-color: #f1c40f;
    /* Palm Oil Gold */
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --border-color: #2d2e42;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.2);
    --font-main: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

p {
    color: var(--text-muted);
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: #fff;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.1);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: #131422;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    background-image: radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(241, 196, 15, 0.05) 0%, transparent 20%);
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-dark);
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-brand i {
    color: var(--secondary-color);
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

/* Stats Cards */
.stats-grid .card {
    position: relative;
    overflow: hidden;
}

.stats-grid .card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    /* Row spacing */
}

thead tr {
    background: transparent;
}

thead th {
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 15px;
    border: none;
}

tbody tr {
    background: #131422;
    transition: transform 0.2s;
}

tbody tr:hover {
    transform: scale(1.01);
    background: #161725;
}

tbody td {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-style: solid none;
    /* Top bottom borders only */
}

tbody td:first-child {
    border-left-style: solid;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

tbody td:last-child {
    border-right-style: solid;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}