/* TikiStats Base Styles */
/* Core variables, layout, sidebar, cards, forms, tables, buttons */

:root {
    --color-dark: #232323;
    --color-green: #80DA47;
    --color-light-green: #AAE7C9;
    --color-teal: #015144;
    --color-light: #F3F2F2;
    --color-accent: #1CC294;
}

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

select {
color: #474747 !important;
background-color: #defff6 !important;
}

.text-muted{
    color: #e7e7e7 !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-dark);
    color: var(--color-light);
    min-height: 100vh;
}
input::placeholder,
textarea::placeholder {
  color: #ededed !important;
  opacity: 0.7 !important;
}

.form-text {
    color: #dedede !important;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    transition: width 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.expanded {
    width: 250px;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 20px;
    background: var(--color-teal);
    display: flex;
    align-items: center;
    height: 80px;
    position: relative;
}

.sidebar.expanded .sidebar-header {
    justify-content: flex-start;
    gap: 15px;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--color-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    color: var(--color-dark);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-logo {
    display: none;
}

.sidebar-brand {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-light);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.sidebar.expanded .sidebar-brand {
    display: block;
}

.sidebar.collapsed .sidebar-brand {
    display: none;
}

.sidebar-menu {
    padding: 20px 0;
    flex: 1;
}

/* Section Headers (unclickable labels) */
.sidebar-section-label {
    padding: 15px 20px 8px 20px;
    color: var(--color-light-green);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar.expanded .sidebar-section-label {
    opacity: 1;
}

.sidebar.collapsed .sidebar-section-label {
    display: none;
}

/* Menu Items */
.sidebar-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: var(--color-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    margin: 2px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.sidebar-item:hover {
    background: rgba(128, 218, 71, 0.1);
    color: var(--color-green);
}

.sidebar-item.active {
    background: rgba(128, 218, 71, 0.2);
    color: var(--color-green);
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--color-green);
    border-radius: 2px;
}

.sidebar-item i {
    font-size: 18px;
    width: 30px;
    text-align: center;
    min-width: 30px;
}

.sidebar-item span {
    margin-left: 15px;
    display: none;
    white-space: nowrap;
    font-size: 0.9rem;
}

.sidebar.expanded .sidebar-item span {
    display: block;
}

/* Submenu styles */
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-submenu.open {
    max-height: 1000px;
}

.sidebar-submenu .sidebar-item {
    padding-left: 40px;
    font-size: 0.85rem;
}

.sidebar-submenu .sidebar-item i {
    font-size: 14px;
}

.sidebar.collapsed .sidebar-submenu {
    display: none;
}

/* Chevron for expandable items */
.sidebar-item .chevron {
    margin-left: auto;
    transition: transform 0.3s ease;
    display: none;
}

.sidebar.expanded .sidebar-item .chevron {
    display: block;
}

.sidebar-item.expanded .chevron {
    transform: rotate(90deg);
}

.sidebar-toggle {
    width: 30px;
    height: 30px;
    background: var(--color-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-dark);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar.expanded .sidebar-toggle {
    margin-left: auto;
}

.sidebar-toggle:hover {
    background: var(--color-light-green);
    transform: scale(1.1);
}

.sidebar-footer {
    padding: 20px 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.sidebar-separator {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px 10px;
}

/* Main Content */
.main-content {
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background: var(--color-dark);
    padding: 20px;
}

.main-content.expanded {
    margin-left: 250px;
}

.main-content.collapsed {
    margin-left: 70px;
}

/* Cards */
.card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border: 1px solid rgba(128, 218, 71, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: var(--color-light);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(128, 218, 71, 0.1);
}

.stat-card {
    text-align: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(128, 218, 71, 0.05) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-green);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-light-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-accent) 100%);
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(128, 218, 71, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-green);
    color: var(--color-green);
    padding: 10px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(128, 218, 71, 0.1);
    border-color: var(--color-green);
    color: var(--color-green);
}

/* Forms */
.form-control, .form-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(128, 218, 71, 0.2);
    color: var(--color-light);
    border-radius: 8px;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--color-green);
    box-shadow: 0 0 0 0.2rem rgba(128, 218, 71, 0.25);
    color: var(--color-light);
}

/* Table */
.table {
    color: var(--color-light);
}

.table-dark {
    background: transparent;
}

.table thead th {
    border-bottom: 2px solid var(--color-green);
    color: var(--color-green);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(128, 218, 71, 0.05);
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(128, 218, 71, 0.2);
    border-top-color: var(--color-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar customization */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(128, 218, 71, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 218, 71, 0.5);
}
