/* Variables */
:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5649c0;
    --secondary-color: #00cec9;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #d63031;
    --text-color: #2d3436;
    --light-color: #f5f6fa;
    --gray-color: #b2bec3;
    --sidebar-width: 250px;
}

/* Base */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f9f9f9;
    color: var(--text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

/* Authentication Pages */
.auth-container {
    display: flex;
    height: 100vh;
}

.auth-image {
    flex: 1;
    background-image: url('../img/qr-hero.png');
    background-size: cover;
    background-position: center;
    display: none;
}

@media (min-width: 992px) {
    .auth-image {
        display: block;
    }
}

.auth-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.logo {
    margin-bottom: 2rem;
    text-align: center;
}

.logo img {
    height: 60px;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Forms */
.form-control, .form-select {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(108, 92, 231, 0.25);
    border-color: var(--primary-color);
}

.form-label {
    font-weight: 500;
}

.input-group-text {
    background-color: transparent;
    padding-right: 1.25rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary-soft {
    background-color: rgba(108, 92, 231, 0.1);
    border: none;
    color: var(--primary-color);
}

.btn-primary-soft:hover {
    background-color: rgba(108, 92, 231, 0.2);
    color: var(--primary-color);
}

.btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: var(--text-color);
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.btn-circle:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.2);
}

.color-picker {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Dashboard */
/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-toggle {
    display: none;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-item {
    padding: 0.75rem 1.5rem;
    position: relative;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 0;
    font-weight: 500;
    transition: all 0.3s;
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--primary-color);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 0 5px 5px 0;
}

.sidebar-icon {
    width: 20px;
    text-align: center;
}

.sidebar-user {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-color);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
    transition: all 0.3s;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard Cards */
.stat-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background-color: rgba(108, 92, 231, 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background-color: rgba(0, 184, 148, 0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background-color: rgba(253, 203, 110, 0.1);
    color: var(--warning-color);
}

.stat-icon.danger {
    background-color: rgba(214, 48, 49, 0.1);
    color: var(--danger-color);
}

.stat-content {
    flex: 1;
    padding-left: 1.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--gray-color);
    font-size: 0.875rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--gray-color);
}

.table td {
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.qr-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.qr-status.active {
    background-color: var(--success-color);
}

.qr-status.inactive {
    background-color: var(--danger-color);
}

.qr-options .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-right: 5px;
}

/* QR Preview */
.qr-preview {
    text-align: center;
    padding: 1.5rem;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.qr-preview img {
    max-width: 100%;
    height: auto;
    max-height: 250px;
}

/* Alerts */
.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
}