/* ========================
   CSS Variables
======================== */
:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --warning: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --gradient: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    --card-shadow: 0 10px 30px rgba(67, 97, 238, 0.15);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    font-weight: 500;
}
.qr-image {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    transition: transform 0.2s;
}
.qr-image:hover {
    transform: scale(1.05);
}
.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 6px;
    margin: 0 2px;
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.action-buttons .btn:hover {
    transform: scale(1.05);
}
.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.token-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    padding: 0.35em 0.65em;
    border-radius: 6px;
}
.table-responsive {
    border-radius: 0 0 15px 15px;
}
.card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
}

/* ========================
   Global Styles
======================== */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
}


/* ========================
   Common Components
======================== */

/* Navbar */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.dashboard-navbar {
    background: var(--gradient) !important;
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.2);
}

/* Buttons */
.btn-login {
    border-radius: 50px;
    padding: 0.5rem 2rem;
    font-weight: 600;
    background: var(--gradient);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.btn-action {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    background: var(--gradient);
    border: none;
    color: white;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-action:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

/* Form Controls */
.form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

.input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
}

.form-control.with-icon {
    border-left: none;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

/* Cards */
.card-common {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: none;
    transition: all 0.3s ease;
}

.card-common:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(67, 97, 238, 0.2);
}


/* ========================
   Table Styles for list.php
======================== */

/* Table Styling */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 1rem 0.75rem;
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f8f9fa;
}

.table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.03);
}

/* Token Badge */
.token-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

/* QR Preview */
.qr-preview {
    transition: transform 0.2s ease;
}

.qr-preview:hover {
    transform: scale(1.05);
}

/* Badge Styling */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #e9ecef;
    color: #6c757d;
}

.pagination .page-item.active .page-link {
    background: var(--gradient);
    border-color: var(--primary);
}

.pagination .page-link:hover {
    background-color: rgba(67, 97, 238, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Card Header */
.card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
}

/* Button Group */
.btn-group .btn {
    border-radius: 6px;
    margin: 0 2px;
}



/* ========================
   Home Page Styles
======================== */

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80vh;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #212529;
    margin-bottom: 2rem;
}

/* ========================
   Login Page Styles
======================== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    max-width: 400px;
    width: 100%;
}

.login-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.login-header {
    background: var(--gradient);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
}

.login-logo {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.login-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
}

.login-body {
    padding: 2rem 1.5rem;
}

.login-footer {
    text-align: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* QR Animation */
.qr-animation {
    position: relative;
    height: 80px;
    margin: 1.5rem 0;
}

.qr-box {
    width: 60px;
    height: 60px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.qr-pattern {
    width: 45px;
    height: 45px;
    background:
        linear-gradient(90deg, transparent 45%, var(--primary) 45%, var(--primary) 55%, transparent 55%),
        linear-gradient(0deg, transparent 45%, var(--primary) 45%, var(--primary) 55%, transparent 55%);
    position: relative;
}

.qr-pattern::before,
.qr-pattern::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 2px;
}

.qr-pattern::before {
    top: 0;
    left: 0;
}

.qr-pattern::after {
    bottom: 0;
    right: 0;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* ========================
   Dashboard Styles
======================== */

/* Welcome Section */
.welcome-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: none;
    overflow: hidden;
    position: relative;
    margin-bottom: 2rem;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
}

.welcome-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 1.5rem;
}

.welcome-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    color: transparent;
}

.welcome-text p {
    color: #6c757d;
    margin-bottom: 0;
}

.user-info {
    display: flex;
    align-items: center;
    background: rgba(67, 97, 238, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 10px;
}

/* Stats Cards */
.stats-container {
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: none;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(67, 97, 238, 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.stat-icon.qr {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.stat-icon.scan {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.stat-icon.user {
    background: rgba(247, 37, 133, 0.1);
    color: var(--warning);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.action-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: none;
    padding: 2rem 1.5rem;
    height: 100%;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(67, 97, 238, 0.2);
}

.action-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.action-card:hover::after {
    transform: scaleX(1);
}

.action-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
}

.action-icon.generate {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.action-icon.manage {
    background: rgba(63, 55, 201, 0.1);
    color: var(--secondary);
}

.action-icon.analytics {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.action-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.action-card p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Recent Activity */
.activity-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: none;
    padding: 1.5rem;
    height: 100%;
}

.activity-card .card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
    padding: 0 0 1rem 0;
    margin-bottom: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: #6c757d;
    font-size: 0.8rem;
}

/* ========================
   Links
======================== */
.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.back-to-home {
    color: #6c757d;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
}

.back-to-home:hover {
    color: var(--primary);
}

/* ========================
   Footer
======================== */
.footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    color: #6c757d;
    text-align: center;
}

.dashboard-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    color: #6c757d;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

/* ========================
   Responsive Design
======================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .welcome-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info {
        margin-top: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .login-container {
        padding: 0.5rem;
    }
}
