/* Admin Panel CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f6fa;
    min-height: 100vh;
}

/* Admin Container */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e3a5f 0%, #0d1b2a 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

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

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
}

.sidebar-header h2 i {
    margin-right: 10px;
    color: #4dabf7;
}

.sidebar-user {
    padding: 12px 20px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #b2bec3;
    font-size: 0.9rem;
}

.sidebar-user i {
    font-size: 1.2rem;
    color: #4dabf7;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #b2bec3;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-left-color: #4dabf7;
}

.nav-menu li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #636e72;
}

.sidebar-footer a {
    color: #4dabf7;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.sidebar-footer a:hover {
    color: #74c0fc;
}

.sidebar-footer span {
    color: #636e72;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 20px 30px;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dfe6e9;
}

.top-header h1 {
    font-size: 1.8rem;
    color: #2d3436;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-right: 20px;
}

.card-info h3 {
    font-size: 2rem;
    color: #2d3436;
}

.card-info p {
    color: #636e72;
    margin-top: 5px;
}

/* Quick Actions */
.quick-actions {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.quick-actions h2 {
    margin-bottom: 20px;
    color: #2d3436;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.btn i {
    font-size: 0.9rem;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #219a52;
}

.btn-info {
    background: #00cec9;
    color: #fff;
}

.btn-info:hover {
    background: #00b5b0;
}

.btn-warning {
    background: #f39c12;
    color: #fff;
}

.btn-warning:hover {
    background: #d68910;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #636e72;
    color: #fff;
}

.btn-secondary:hover {
    background: #4d5656;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

.form-section,
.table-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-section h2,
.table-section h2 {
    margin-bottom: 20px;
    color: #2d3436;
    font-size: 1.2rem;
}

/* Forms */
.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3436;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="file"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

.admin-form input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 5px;
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    gap: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.current-image {
    margin-top: 10px;
}

.current-image img {
    border-radius: 8px;
    border: 1px solid #dfe6e9;
}

/* Tables */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header h2 {
    margin-bottom: 0;
}

.filter-group select {
    padding: 10px 15px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 0.9rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f1f2f6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2d3436;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table .icon-cell {
    font-size: 1.5rem;
}

.data-table .image-cell img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.data-table .no-image {
    width: 50px;
    height: 50px;
    background: #f1f2f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b2bec3;
}

.data-table .price {
    font-weight: 600;
    color: #27ae60;
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

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

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #4dabf7;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 1.8rem;
    color: #2d3436;
    margin-bottom: 5px;
}

.login-header p {
    color: #636e72;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3436;
}

.login-form input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 1rem;
}

.login-form input:focus {
    outline: none;
    border-color: #1e3a5f;
}

.login-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.login-footer a {
    color: #1e3a5f;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-footer a:hover {
    color: #3498db;
}

.login-footer span {
    color: #636e72;
}

/* QR Code Page */
.qrcode-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.qrcode-card,
.qrcode-preview {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.qrcode-card {
    text-align: center;
}

.qrcode-card h2 {
    color: #2d3436;
    margin-bottom: 10px;
}

.qrcode-card .menu-url {
    color: #636e72;
    font-size: 0.9rem;
    margin-bottom: 30px;
    word-break: break-all;
}

#qrcode {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

#qrcode svg {
    max-width: 100%;
    height: auto;
}

.qrcode-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.qrcode-options .form-group {
    text-align: left;
}

.qrcode-options label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #636e72;
}

.qrcode-options select,
.qrcode-options input[type="color"] {
    padding: 10px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
}

.qrcode-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.qrcode-preview h2 {
    color: #2d3436;
    margin-bottom: 20px;
}

.usage-tips {
    list-style: none;
    margin-bottom: 30px;
}

.usage-tips li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f2f6;
    color: #636e72;
}

.usage-tips li i {
    color: #27ae60;
    margin-right: 10px;
}

.test-scan {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.test-scan h3 {
    margin-bottom: 10px;
    color: #2d3436;
}

.test-scan p {
    color: #636e72;
    margin-bottom: 15px;
}

/* Settings Page */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.settings-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.settings-card h2 {
    margin-bottom: 20px;
    color: #2d3436;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-link-info .link-box {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.menu-link-info input {
    flex: 1;
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 0.9rem;
}

.slug-info {
    color: #636e72;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .qrcode-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    .top-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}
