/* assets/css/theme.css */

:root {
  /* Brand Core Identity */
  --brand-magenta: #C20067;       /* The deep, vibrant magenta base background */
  --brand-magenta-dark: #8b0046;
  --brand-gold-pure: #E2B747;     /* Solid premium gold for text/accents */
  --brand-gold-light: #F7E49D;    /* Vibrant gold highlight for borders/glows */
  --brand-gold-dark: #A37A24;

  /* Interface Backgrounds */
  --bg-dark-premium: #16000D;    /* Ultra-dark premium purple/black for background depth */
  --bg-sidebar: #1a0010;
  --glass-surface: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(226, 183, 71, 0.15); /* Soft gold-tinted transparent border */

  /* System States */
  --state-locked: #64748b;        /* Slate gray for unachieved milestones */
  --state-glow: 0 0 15px rgba(242, 183, 71, 0.6);
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

/* Base Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

/* Sidebar Styling */
.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    flex: 1;
    padding: 12px 0;
    list-style: none;
    overflow-y: auto;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    opacity: 0.8;
}

.sidebar-menu-item a:hover, .sidebar-menu-item.active a {
    background: var(--glass-surface);
    color: var(--brand-gold-pure);
    border-left-color: var(--brand-gold-pure);
    opacity: 1;
}

.sidebar-menu-item a i {
    width: 20px;
    text-align: center;
    color: var(--brand-gold-pure);
}

/* Main Wrapper */
.main-wrapper {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navbar */
.top-navbar {
    height: 70px;
    background: rgba(22, 0, 13, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.search-form {
    display: flex;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 6px 15px;
    width: 300px;
}

.search-form input {
    background: transparent;
    border: none;
    color: white;
    padding: 4px;
    width: 100%;
    outline: none;
}

.top-navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Content Page */
.content-page {
    padding: 32px;
    flex: 1;
}

.page-heading {
    margin-bottom: 30px;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    list-style: none;
    display: flex;
    gap: 8px;
}

/* Glassmorphic Luxury Cards */
.glass-card, .card {
    background: var(--glass-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(194, 0, 103, 0.05);
    transition: transform 0.2s, border-color 0.2s;
}

.glass-card:hover {
    border-color: rgba(226, 183, 71, 0.3);
}

.card-header {
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
    padding-bottom: 15px;
}

/* Layout Utilities */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card-group-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

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

.stat-icon {
    font-size: 2rem;
    color: var(--brand-gold-pure);
    background: var(--glass-surface);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.stat-content h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-content p {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-top: 4px;
}

/* Typography Helpers */
.gold-gradient-text {
    background: linear-gradient(135deg, #F7E49D 0%, #E2B747 50%, #A37A24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.gold-text {
    color: var(--brand-gold-pure);
    font-weight: 600;
}

/* Buttons */
.btn-gold, .btn-primary {
    background: linear-gradient(135deg, var(--brand-magenta) 0%, var(--brand-magenta-dark) 100%);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-gold:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(194, 0, 103, 0.4);
    border-color: var(--brand-gold-pure);
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    letter-spacing: 1px;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--text-main);
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status.approved, .status.active { background: rgba(40, 167, 69, 0.1); color: #28a745; border: 1px solid rgba(40, 167, 69, 0.2); }
.status.pending { background: rgba(255, 193, 7, 0.1); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.2); }
.status.rejected, .status.canceled { background: rgba(220, 53, 69, 0.1); color: #dc3545; border: 1px solid rgba(220, 53, 69, 0.2); }

/* Progress Bar (Gold Maturity Tracker) */
.progress-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    height: 12px;
    position: relative;
    margin: 20px 0;
}

.progress-fill {
    background: linear-gradient(90deg, var(--brand-magenta) 0%, var(--brand-gold-pure) 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px rgba(226, 183, 71, 0.5);
}

.milestone-badge {
    position: absolute;
    top: -30px;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
}

.milestone-node {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #334155;
    border: 2px solid var(--glass-border);
}

.milestone-node.unlocked {
    background: var(--brand-gold-pure);
    box-shadow: var(--state-glow);
    border-color: var(--brand-gold-light);
}

/* Forms */
.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--brand-gold-pure);
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 50px rgba(0, 0, 0, 0.8);
    }
    .top-navbar-right span {
        display: none;
    }
}

.row { display: flex; flex-wrap: wrap; margin-right: -12px; margin-left: -12px; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 12px; }
.col-lg-7 { flex: 0 0 58.333%; max-width: 58.333%; padding: 0 12px; }
.col-lg-5 { flex: 0 0 41.666%; max-width: 41.666%; padding: 0 12px; }

@media (max-width: 992px) {
    .col-lg-7, .col-lg-5 { flex: 0 0 100%; max-width: 100%; }
}

.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-primary { color: var(--brand-magenta) !important; }

/* Tree Styles */
.tree-container {
    display: flex;
    justify-content: center;
    padding: 40px 0;
    min-width: 1000px;
}

.tree-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.node-card {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    min-width: 100px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.node-card:hover {
    transform: scale(1.05);
    border-color: var(--brand-gold-pure);
    box-shadow: var(--state-glow);
}

.node-card small {
    color: var(--brand-gold-pure);
    font-size: 10px;
}

.node-hover-details {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    border: 1px solid var(--brand-gold-pure);
    padding: 10px;
    border-radius: 8px;
    font-size: 11px;
    width: 150px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 10;
}

.node-card:hover .node-hover-details {
    opacity: 1;
}

.tree-children {
    display: flex;
    gap: 20px;
    position: relative;
    padding-top: 20px;
}

.tree-children::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    height: 1px;
    background: var(--glass-border);
}

.tree-connector-v {
    width: 1px;
    height: 20px;
    background: var(--glass-border);
}
