* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #3b82f6;
    --accent-dark: #1e40af;
    --accent-light: #60a5fa;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--gray-50);
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.navbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.navbar-menu li {
    margin: 0;
}

.navbar-menu a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    position: relative;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    right: 1rem;
}

.navbar-menu a:hover {
    color: var(--accent);
    background: var(--gray-100);
}

.navbar-menu a:hover::after {
    width: calc(100% - 2rem);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

.card-header {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent);
    color: var(--primary);
    letter-spacing: -0.5px;
}

.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(30, 58, 138, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 400;
}

.hero .btn {
    margin: 0 0.5rem;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

.auth-card {
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-card.card {
    box-shadow: var(--shadow-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--gray-500);
    font-weight: 500;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-500);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: var(--accent-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--gray-700);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:hover {
    border-color: var(--accent-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left-color: var(--success);
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: var(--danger);
}

.alert-info {
    background: #eff6ff;
    color: #0c2d6b;
    border-left-color: var(--accent);
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-light);
}

.product-header {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 1.5rem;
    flex-shrink: 0;
}

.product-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.product-code {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.product-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.product-price-section {
    flex: 1;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--accent);
    margin: 0;
    line-height: 1;
}

.product-old-price {
    text-decoration: line-through;
    color: var(--gray-400);
    font-size: 0.9rem;
    margin-right: 0.5rem;
    font-weight: 500;
}

.product-discount {
    background: var(--danger);
    color: white;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
    letter-spacing: 0.5px;
}

.product-stock {
    color: var(--gray-500);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.product-desc {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

.product-footer {
    margin-top: auto;
}

.dashboard {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.dashboard h1 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--accent);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

.stat-card.success {
    border-left-color: var(--success);
}

.stat-card.warning {
    border-left-color: var(--warning);
}

.stat-card.danger {
    border-left-color: var(--danger);
}

.stat-label {
    color: var(--gray-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

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

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-50);
    font-weight: 700;
    color: var(--gray-700);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.table td {
    font-size: 0.95rem;
    color: var(--gray-700);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #ecfdf5;
    color: #065f46;
}

.badge-pending {
    background: #fffbeb;
    color: #92400e;
}

.badge-failed {
    background: #fef2f2;
    color: #991b1b;
}

.footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

.footer a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
}

.order-form {
    max-width: 600px;
    margin: 0 auto;
}

.qris-display {
    text-align: center;
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.qris-display img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 2px solid white;
}

.timer {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--danger);
    text-align: center;
    margin: 1rem 0;
    letter-spacing: 0.5px;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-600);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .navbar-menu {
        gap: 0.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar-menu a {
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
    }

    .navbar-menu a::after {
        display: none;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card-header {
        font-size: 1.25rem;
    }

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

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-height: auto;
    }

    .product-header {
        padding: 1.25rem;
    }

    .product-header h3 {
        font-size: 1.1rem;
    }

    .product-body {
        padding: 1.25rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .dashboard h1 {
        font-size: 1.5rem;
    }

    .table th,
    .table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .footer {
        padding: 2rem 0;
    }

    .auth-page {
        padding: 1rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .form-control {
        padding: 0.75rem 0.875rem;
    }

    .qris-display {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-menu {
        gap: 0.125rem;
    }

    .navbar-menu a {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .hero .btn {
        display: block;
        margin: 0.5rem 0;
        width: 100%;
    }

    .card {
        padding: 1.25rem;
        border-radius: var(--radius);
    }

    .card-header {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .product-header h3 {
        font-size: 1rem;
    }

    .product-code {
        font-size: 0.7rem;
        padding: 0.25rem 0.75rem;
    }

    .product-price {
        font-size: 1.25rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .dashboard h1 {
        font-size: 1.25rem;
    }

    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }

    .btn-sm {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 0.65rem 0.75rem;
        font-size: 0.9rem;
    }

    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state-icon {
        font-size: 3rem;
        margin-bottom: 0.75rem;
    }

    .empty-state h2 {
        font-size: 1.25rem;
    }
}
