/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #ffffff;
    color: #000000;
    min-height: 100vh;
}

/* Authentication Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 28rem;
    border: 1px solid #e5e7eb;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #000000;
}

.auth-subtitle {
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 2rem;
    color: #666666;
}

.auth-form {
    margin-top: 1.5rem;
}

.auth-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: transparent;
}

.sidebar {
    width: 18rem;
    background: #000000;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-right: 1px solid #e5e7eb;
    position: relative;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: #000000;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333333;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.sidebar-nav {
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: #cccccc;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.nav-link:hover {
    background: #1a1a1a;
    color: #ffffff;
}

.nav-link.active {
    background: #ffffff;
    color: #000000;
}

.nav-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.sidebar-footer {
    margin-top: 2rem;
}

.main-content {
    flex: 1;
    padding: 2rem;
    background: #ffffff;
    overflow-y: auto;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #000000;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.input-group {
    display: flex;
}

.input-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: 1px solid #000000;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: #000000;
    color: white;
    border-color: #000000;
}

.btn-primary:hover:not(:disabled) {
    background: #333333;
}

.btn-secondary {
    background: white;
    color: #000000;
    border-color: #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
}

.btn-success {
    background: #000000;
    color: white;
    border-color: #000000;
}

.btn-success:hover:not(:disabled) {
    background: #333333;
}

.btn-danger {
    background: white;
    color: #000000;
    border-color: #000000;
}

.btn-danger:hover:not(:disabled) {
    background: #000000;
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Card */
.card {
    background: white;
    padding: 2rem;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.card h2,
.card h3 {
    margin-bottom: 1rem;
}

/* Messages */
.error-message,
.success-message {
    padding: 1rem 1.25rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    border: 1px solid;
}

.error-message {
    background: #fef2f2;
    border-color: #000000;
    color: #000000;
}

.success-message {
    background: #f0fdf4;
    border-color: #000000;
    color: #000000;
}

.hidden {
    display: none !important;
}

/* Table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
}

.data-table thead {
    background: #000000;
}

.data-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: white;
}

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

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.menu-card {
    background: white;
    padding: 2rem;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.menu-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #000000;
}

.menu-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #000000;
    position: relative;
    z-index: 1;
}

.menu-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 1;
}

.menu-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.menu-card-actions .btn {
    flex: 1;
    padding: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* Section */
.section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Link */
.link {
    color: #2563eb;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Image Upload */
.image-preview {
    margin-bottom: 1rem;
}

.image-preview img {
    width: 8rem;
    height: 8rem;
    object-fit: cover;
    border-radius: 0.5rem;
}

.upload-status {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* Publish Page */
.publish-container {
    max-width: 42rem;
    margin: 0 auto;
}

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

.mb-4 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.success-title {
    color: #10b981;
    font-size: 1.5rem;
    font-weight: 600;
}

.publish-result {
    margin-top: 1.5rem;
}

.help-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.qr-container {
    display: inline-block;
    padding: 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.qr-container img {
    width: 16rem;
    height: 16rem;
    display: block;
}

.publish-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.publish-actions a,
.publish-actions button {
    flex: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 16rem;
        padding: 1rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Dashboard Layout */
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 80%;
        max-width: 20rem;
        z-index: 1000;
        transform: translateX(-100%);
        border-right: none;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header {
        margin-bottom: 1rem;
    }

    .sidebar-header h1 {
        font-size: 1.25rem;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .main-content {
        padding: 1rem;
        padding-top: 4rem;
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    /* Menu Grid */
    .menu-grid {
        grid-template-columns: 1fr;
    }

    /* Auth Card */
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .auth-subtitle {
        font-size: 0.9375rem;
    }

    /* Cards */
    .card {
        padding: 1.5rem;
    }

    /* Tables */
    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 1rem;
    }

    /* Buttons */
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }

    /* Publish */
    .publish-container {
        padding: 1rem;
    }

    .qr-container img {
        width: 12rem;
        height: 12rem;
    }

    .publish-actions {
        flex-direction: column;
    }

    .publish-actions a,
    .publish-actions button {
        width: 100%;
    }

    /* Menu Card Actions */
    .menu-card-actions {
        flex-direction: column;
    }

    .menu-card-actions .btn {
        width: 100%;
    }

    /* Section Header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    /* Base */
    body {
        font-size: 14px;
    }

    /* Auth Pages */
    .auth-card {
        padding: 1.5rem 1rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-subtitle {
        font-size: 0.875rem;
    }

    /* Main Content */
    .main-content {
        padding: 0.75rem;
    }

    /* Page Header */
    .page-header h1 {
        font-size: 1.25rem;
    }

    /* Cards */
    .card {
        padding: 1rem;
    }

    .menu-card {
        padding: 1.5rem;
    }

    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .btn-lg {
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
    }

    /* Forms */
    .form-group label {
        font-size: 0.875rem;
    }

    .form-control {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    /* Tables - Make scrollable */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 600px;
    }

    .data-table th,
    .data-table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    /* QR Code */
    .qr-container {
        padding: 0.75rem;
    }

    .qr-container img {
        width: 10rem;
        height: 10rem;
    }

    /* Sidebar */
    .sidebar {
        padding: 0.75rem;
    }

    .sidebar-header h1 {
        font-size: 1.125rem;
    }

    .nav-link {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    /* Section */
    .section-header h2 {
        font-size: 1.125rem;
    }
}
