/* Custom CSS for LicenseHub Admin Dashboard */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;
    --navbar-height: 60px;
    --primary-color: #10b981;
    --primary-dark: #059669;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #10b981;
}

/* Sidebar Styles */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar-brand:hover {
    color: var(--primary-color);
}

.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.sidebar-item {
    margin: 0.25rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-link:hover,
.sidebar-item.active .sidebar-link {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.sidebar-item.active .sidebar-link {
    border-left: 3px solid var(--primary-color);
}

.sidebar-link i {
    width: 24px;
    margin-right: 12px;
    font-size: 1rem;
}

.sidebar-divider {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.4);
    padding: 1.5rem 1.5rem 0.5rem;
    font-weight: 600;
}

/* Main Content */
#content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
    background: #f1f5f9;
}

#content.expanded {
    width: 100%;
    margin-left: 0;
}

.main-content {
    min-height: calc(100vh - var(--navbar-height));
}

/* Stats Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

/* Icon colors */
.bg-primary-soft { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.bg-info-soft { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.bg-warning-soft { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.bg-danger-soft { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.bg-purple-soft { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

/* License key display */
.license-key {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Form controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* Modal */
.modal-header {
    border-bottom: 1px solid #e2e8f0;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    #content {
        width: 100%;
        margin-left: 0;
    }
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.login-logo {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Copy button */
.btn-copy {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Action column */
.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

/* DataTables customization */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: #fff !important;
}
