:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --sidebar-width: 250px;
    --header-height: 70px;
    --card-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f5f7fb;
    color: #333;
    display: flex;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--info);
    outline-offset: 2px;
}

/* Layout */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-menu a {
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    padding: 15px 20px;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 4px solid white;
    padding-left: 16px;
}

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

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

body.sidebar-open .sidebar-overlay {
    display: block;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

main.content-area {
    padding: 24px;
    flex-grow: 1;
}

header {
    background-color: white;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

#sidebar-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Cards & Tables */
.card {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.data-table caption {
    text-align: left;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-info img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn:active {
    transform: translateY(1px);
}

.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 15px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Dashboard & Shared Components */
.welcome-banner {
    background: linear-gradient(45deg, var(--primary), var(--info));
    color: white;
    border-radius: var(--card-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.welcome-banner h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.summary-card {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 15px;
    display: flex;
    align-items: center;
}

.summary-icon {
    font-size: 20px;
    padding: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.icon-revenue {
    background-color: #d4edda;
    color: #155724;
}

.icon-sales {
    background-color: #f8d7da;
    color: #721c24;
}

.icon-products {
    background-color: #fff3cd;
    color: #856404;
}

.icon-transactions {
    background-color: #cce5ff;
    color: #004085;
}

.summary-details h3 {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
}

.summary-details p {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.main-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    #sidebar-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
}

@media (max-width: 576px) {

    main.content-area,
    header {
        padding-left: 15px;
        padding-right: 15px;
    }

    .header-title {
        font-size: 1.2rem;
    }

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

    .summary-card {
        padding: 12px;
    }

    .summary-icon {
        font-size: 18px;
        padding: 10px;
    }

    .summary-details p {
        font-size: 18px;
    }

    .card {
        padding: 15px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 5px;
    }
}

@media (min-width: 768px) {
    .welcome-banner {
        padding: 25px;
    }

    .welcome-banner h2 {
        font-size: 1.8rem;
    }

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

@media (min-width: 992px) {
    .welcome-banner {
        padding: 30px;
    }

    .welcome-banner h2 {
        font-size: 2rem;
    }

    .summary-cards {
        gap: 20px;
        margin-bottom: 30px;
    }

    .summary-card {
        padding: 20px;
    }
}

/* Transaksi Page */
.transaction-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: flex-start;
}

.transaction-container .card {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.transaction-container .card-title {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.transaction-container .form-group {
    margin-bottom: 15px;
}

.transaction-container .form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.transaction-container .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.transaction-container .input-group {
    display: flex;
}

.transaction-container .input-group .form-control {
    border-radius: 8px 0 0 8px;
}

.transaction-container .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color .3s;
}

.transaction-container .btn-primary {
    background-color: var(--primary);
    color: white;
}

.transaction-container .btn-primary:hover {
    background-color: var(--secondary);
}

.transaction-container .btn-success {
    background-color: var(--success);
    color: white;
}

.transaction-container .btn-danger {
    background-color: var(--danger);
    color: white;
}

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

.cart-table th,
.cart-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    font-weight: 600;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1rem;
}

.summary-total {
    font-weight: bold;
    font-size: 1.2em;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.btn-full {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
}

#cartTableBody tr:last-child td {
    border-bottom: none;
}

#cartTableBody .btn-sm {
    padding: 5px 10px;
    font-size: 0.8em;
}

/* Nota Transaksi */
.nota-body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f5f5f5;
    padding: 20px;
}

.nota-container {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.nota-header {
    text-align: center;
    border-bottom: 2px dashed #333;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.store-name {
    font-size: 18px;
    font-weight: bold;
}

.transaction-details {
    margin-bottom: 10px;
    font-size: 12px;
}

.items-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.items-table th {
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.items-table td {
    padding: 5px 0;
}

.total-section {
    border-top: 2px dashed #333;
    margin-top: 10px;
    padding-top: 10px;
    text-align: right;
    font-weight: bold;
}

.nota-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
}

.no-print {
    margin-top: 20px;
    text-align: center;
}

.btn-print {
    background-color: #4361ee;
}

.btn-back {
    background-color: #6c757d;
}

@media print {
    .nota-body {
        background-color: white;
    }

    .nota-container {
        box-shadow: none;
    }

    .no-print {
        display: none;
    }
}

/* Login Page */
.login-page {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-image: url('https://images.unsplash.com/photo-1595950653106-6c9ebd614d3a?q=80&w=1887&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #333;
}

.login-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.login-container h2 {
    margin-bottom: 10px;
    font-weight: 600;
    color: #222;
}

.login-container p {
    margin-bottom: 30px;
    color: #666;
    font-size: 14px;
}

.login-container .input-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-container .input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.login-container .input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.login-container .input-group input:focus {
    outline: none;
    border-color: #007bff;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    border: none;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #0056b3;
}

.reset-password {
    margin-top: 15px;
    font-size: 13px;
}

.reset-password a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.reset-password a:hover {
    text-decoration: underline;
}

#error-message {
    color: #d93025;
    font-size: 13px;
    margin-top: 15px;
    display: none;
}

/* Tambah Produk / Forms */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.is-invalid {
    border-color: var(--danger);
}

.invalid-feedback {
    color: var(--danger);
    font-size: 14px;
    margin-top: 5px;
}

/* Produk Page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
}

.card-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.search-bar {
    width: 300px;
}

.card-body {
    padding: 20px;
}

.table-responsive {
    overflow-x: auto;
}

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

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

.product-table th {
    background: #f5f7fb;
    font-weight: 600;
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-instock {
    background-color: #d4edda;
    color: #155724;
}

.status-lowstock {
    background-color: #fff3cd;
    color: #856404;
}

.status-outstock {
    background-color: #f8d7da;
    color: #721c24;
}

.action-buttons .btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    margin: 0 5px;
}

.btn-edit {
    color: var(--warning);
}

.btn-delete {
    color: var(--danger);
}

/* Detail Produk Page */
.detail-produk-container {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.detail-produk-container h2 {
    color: #4361ee;
    margin-bottom: 25px;
    grid-column: 1 / -1;
    font-size: 28px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.detail-product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: flex;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 12px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #555;
    width: 120px;
    flex-shrink: 0;
}

.detail-value {
    color: #212529;
    font-weight: 500;
    line-height: 1.5;
}

.detail-actions {
    grid-column: 1 / -1;
    margin-top: 20px;
    text-align: right;
}

@media (max-width: 768px) {
    .detail-produk-container {
        grid-template-columns: 1fr;
        padding: 25px;
    }

    .detail-product-image {
        height: 250px;
        margin-bottom: 20px;
    }
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    margin-right: 5px;
    color: #6c757d;
}

.breadcrumb li a {
    color: var(--primary);
    text-decoration: none;
}

/* Edit Profile Page */
.profile-form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.edit-section {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    padding: 2rem;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
}

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

.report-title {
    font-size: 24px;
}

.charts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

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

.report-table th {
    font-weight: 600;
}

.btn-export {
    background-color: #1D6F42;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-export:hover {
    background-color: #165934;
}

/* Welcome Page */
.welcome-page {
    color: rgba(33, 37, 41, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 16px;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.welcome-page header {
    background-color: rgba(247, 248, 249, 1);
    padding: .4rem 0 0;
}

.welcome-page .menu {
    padding: .4rem 2rem;
}

.welcome-page header ul {
    border-bottom: 1px solid rgba(242, 242, 242, 1);
    list-style-type: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
    text-align: right;
}

.welcome-page header li {
    display: inline-block;
}

.welcome-page header li a {
    border-radius: 5px;
    color: rgba(0, 0, 0, .5);
    display: block;
    height: 44px;
    text-decoration: none;
}

.welcome-page header li.menu-item a {
    border-radius: 5px;
    margin: 5px 0;
    height: 38px;
    line-height: 36px;
    padding: .4rem .65rem;
    text-align: center;
}

.welcome-page header li.menu-item a:hover,
.welcome-page header li.menu-item a:focus {
    background-color: rgba(221, 72, 20, .2);
    color: rgba(221, 72, 20, 1);
}

.welcome-page header .logo {
    float: left;
    height: 44px;
    padding: .4rem .5rem;
}

.welcome-page header .menu-toggle {
    display: none;
    float: right;
    font-size: 2rem;
    font-weight: bold;
}

.welcome-page header .menu-toggle button {
    background-color: rgba(221, 72, 20, .6);
    border: none;
    border-radius: 3px;
    color: rgba(255, 255, 255, 1);
    cursor: pointer;
    font: inherit;
    font-size: 1.3rem;
    height: 36px;
    padding: 0;
    margin: 11px 0;
    overflow: visible;
    width: 40px;
}

.welcome-page header .menu-toggle button:hover,
.welcome-page header .menu-toggle button:focus {
    background-color: rgba(221, 72, 20, .8);
    color: rgba(255, 255, 255, .8);
}

.welcome-page header .heroe {
    margin: 0 auto;
    max-width: 1100px;
    padding: 1rem 1.75rem 1.75rem 1.75rem;
}

.welcome-page header .heroe h1 {
    font-size: 2.5rem;
    font-weight: 500;
}

.welcome-page header .heroe h2 {
    font-size: 1.5rem;
    font-weight: 300;
}

.welcome-page section {
    margin: 0 auto;
    max-width: 1100px;
    padding: 2.5rem 1.75rem 3.5rem 1.75rem;
}

.welcome-page section h1 {
    margin-bottom: 2.5rem;
}

.welcome-page section h2 {
    font-size: 120%;
    line-height: 2.5rem;
    padding-top: 1.5rem;
}

.welcome-page section pre {
    background-color: rgba(247, 248, 249, 1);
    border: 1px solid rgba(242, 242, 242, 1);
    display: block;
    font-size: .9rem;
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.welcome-page section code {
    display: block;
}

.welcome-page section a {
    color: rgba(221, 72, 20, 1);
}

.welcome-page section svg {
    margin-bottom: -5px;
    margin-right: 5px;
    width: 25px;
}

.welcome-page .further {
    background-color: rgba(247, 248, 249, 1);
    border-bottom: 1px solid rgba(242, 242, 242, 1);
    border-top: 1px solid rgba(242, 242, 242, 1);
}

.welcome-page .further h2:first-of-type {
    padding-top: 0;
}

.welcome-page .svg-stroke {
    fill: none;
    stroke: #000;
    stroke-width: 32px;
}

.welcome-page footer {
    background-color: rgba(221, 72, 20, .8);
    text-align: center;
}

.welcome-page footer .environment {
    color: rgba(255, 255, 255, 1);
    padding: 2rem 1.75rem;
}

.welcome-page footer .copyrights {
    background-color: rgba(62, 62, 62, 1);
    color: rgba(200, 200, 200, 1);
    padding: .25rem 1.75rem;
}

@media (max-width: 629px) {
    .welcome-page header ul {
        padding: 0;
    }

    .welcome-page header .menu-toggle {
        padding: 0 1rem;
    }

    .welcome-page header .menu-item {
        background-color: rgba(244, 245, 246, 1);
        border-top: 1px solid rgba(242, 242, 242, 1);
        margin: 0 15px;
        width: calc(100% - 30px);
    }

    .welcome-page header .menu-toggle {
        display: block;
    }

    .welcome-page header .hidden {
        display: none;
    }

    .welcome-page header li.menu-item a {
        background-color: rgba(221, 72, 20, .1);
    }

    .welcome-page header li.menu-item a:hover,
    .welcome-page header li.menu-item a:focus {
        background-color: rgba(221, 72, 20, .7);
        color: rgba(255, 255, 255, .8);
    }
}