/* Dynamic Theme CSS - Generated from settings */
:root {
    --theme-primary: #a78bfa;
    --theme-secondary: #8b5cf6;
    --theme-accent: #7c3aed;
}


/* ========== THEME COLORS (Both Dark & Light) ========== */

/* Sidebar Menu Items - Theme Colors */
.sidebar__link:hover,
.sidebar__link.is-active {
    color: var(--theme-primary) !important;
}

.sidebar__link:hover .sidebar__icon,
.sidebar__link.is-active .sidebar__icon {
    color: var(--theme-primary) !important;
}

/* Primary Button */
.button--primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25);
    color: #ffffff !important;
}

.button--primary:hover {
    background: linear-gradient(135deg, var(--theme-secondary) 0%, var(--theme-accent) 100%);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
    transform: translateY(-1px);
}

/* Stats and Values */
.stat-card__value,
.metric {
    color: var(--theme-primary) !important;
}

/* Links */
a {
    color: var(--theme-primary) !important;
}

a:hover {
    color: var(--theme-secondary) !important;
}

/* Badges */
.badge--primary {
    background: var(--theme-primary) !important;
    color: #ffffff !important;
}

/* Active Navigation */
.nav-link.is-active {
    color: var(--theme-primary) !important;
}

/* ========== DARK THEME SPECIFIC ========== */
.sidebar__link.is-active {
    background: linear-gradient(90deg, rgba(111, 196, 255, 0.15), transparent);
    border-left-color: var(--theme-primary);
}

.sidebar__link:hover {
    background: rgba(111, 196, 255, 0.08);
}

.card:hover {
    border-color: rgba(111, 196, 255, 0.25);
}

/* Keep dark theme text colors as default */
body {
    color: var(--text-body);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--brand-ice);
}

.card h2 {
    color: var(--brand-ice);
}

th {
    color: var(--text-muted);
}

td {
    color: var(--text-body);
}

/* Input Focus States */
input:focus, 
textarea:focus, 
select:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(111, 196, 255, 0.12) !important;
}

/* ========== STANDARDIZED BUTTON SYSTEM ========== */

/* Base Button Styles - Consistent across all themes */
.button,
button[type="submit"],
button[type="button"],
input[type="submit"],
input[type="button"],
a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    min-height: 40px;
    line-height: 1.4;
}

/* Button Sizes */
.button--compact,
.button--small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

.button--large {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-height: 48px;
}

/* Primary Button */
.button--primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.button--primary:hover {
    background: linear-gradient(135deg, var(--theme-secondary) 0%, var(--theme-accent) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.button--primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Ghost/Outline Button */
.button--ghost,
.button--secondary {
    background: transparent;
    color: var(--text-body) !important;
    border: 1px solid var(--border-soft) !important;
}

.button--ghost:hover,
.button--secondary:hover {
    background: rgba(111, 196, 255, 0.08) !important;
    border-color: var(--border-glow) !important;
}

/* Danger Button */
.button--danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.button--danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* Success Button */
.button--success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.button--success:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    transform: translateY(-1px);
}

/* Warning Button */
.button--warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.button--warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* Disabled Button */
.button:disabled,
.button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Icon in Buttons */
.button i,
.button svg {
    font-size: 1em;
    width: 1em;
    height: 1em;
}

/* Link styled as button */
a.button {
    display: inline-flex;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-soft);
    flex-wrap: wrap;
}

/* Table Action Buttons */
.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

/* Standardize all submit buttons */
button[type="submit"]:not([class]) {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    color: #ffffff !important;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
}
