/* ESET License Manager - Custom Styles */

:root {
    --sidebar-width: 260px;
    --primary-color: #0096a1;      /* Podstawowy kolor ESET */
    --secondary-color: #00b8c5;    /* Jaśniejszy akcent */
    --sidebar-bg: #006b75;         /* Ciemniejszy akcent */
    --sidebar-hover: #008891;      /* Średni akcent (hover) */
    
    /* Override Bootstrap primary color */
    --bs-primary: #006b75;
    --bs-primary-rgb: 0, 107, 117;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
}

/* Wrapper for sidebar and content */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar Styles */
.sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    transition: all 0.3s;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

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

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    text-align: center;
}

.sidebar-header i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.sidebar-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.sidebar ul.components {
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar ul li a {
    padding: 15px 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar ul li a i {
    margin-right: 12px;
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.sidebar ul li a:hover,
.sidebar ul li.active > a {
    background: var(--sidebar-hover);
    color: #fff;
    padding-left: 25px;
}

.sidebar ul li.active > a {
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
    border-left: 4px solid var(--primary-color);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: rgba(0,0,0,0.2);
}

/* Content Area */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    margin-left: var(--sidebar-width);
    background-color: #f4f6f9;
}

.sidebar.active ~ #content {
    margin-left: 0;
}

/* Top Navbar */
#content .navbar {
    padding: 15px 20px;
    background: #fff !important;
    border-bottom: 1px solid #e3e6f0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58,59,69,.15);
}

#sidebarCollapse {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#sidebarCollapse:hover {
    transform: scale(1.05);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #e3e6f0;
    border-radius: 10px 10px 0 0 !important;
}

/* Tables */
.table {
    color: #5a5c69;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 150, 161, 0.05);
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: #006b75;
    border-color: #006b75;
    color: #fff;
}

.btn-primary:hover {
    background: #005a63;
    border-color: #005a63;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 107, 117, 0.3);
}

.btn-primary:focus,
.btn-primary:active {
    background: #004d54;
    border-color: #004d54;
    color: #fff;
}

.btn-outline-primary {
    color: #006b75;
    border-color: #006b75;
}

.btn-outline-primary:hover {
    background-color: #006b75;
    border-color: #006b75;
    color: #fff;
}

.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #006b75;
    border-color: #006b75;
    color: #fff;
}

.btn-check:checked + .btn-outline-primary {
    background-color: #006b75;
    border-color: #006b75;
    color: #fff;
}

.btn-check:focus + .btn-outline-primary {
    box-shadow: 0 0 0 0.25rem rgba(0, 107, 117, 0.25);
}

/* User Dropdown */
.dropdown-toggle::after {
    margin-left: 0.5em;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(0, 150, 161, 0.1);
    padding-left: 1.8rem;
}

.dropdown-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 150, 161, 0.25);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
}

/* Shadows */
.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58,59,69,.15) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    #content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar.active ~ #content {
        margin-left: var(--sidebar-width);
    }
    
    .sidebar-header h3 {
        font-size: 1.2rem;
    }
}

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

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

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Loading Animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Custom utilities */
.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-xs {
    font-size: 0.7rem;
}

.text-uppercase {
    text-transform: uppercase;
}

/* Modal improvements */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Animation for page transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container-fluid {
    animation: fadeIn 0.3s ease-in;
}
