/* =====================================================
   SISTEM INFORMASI MINIMARKET - STYLESHEET
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --admin-color: #8e44ad;
    --kasir-color: #27ae60;
    --owner-color: #e67e22;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* =====================================================
   HEADER & FOOTER
   ===================================================== */

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header.admin {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
}

.header.kasir {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.header.owner {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-brand .icon {
    font-size: 32px;
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.header-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    padding: 8px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.user-info .user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info .role-badge {
    background: rgba(255,255,255,0.25);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 25px;
    margin-top: 50px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* =====================================================
   CONTAINER & LAYOUT
   ===================================================== */

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px 20px;
    background-color: white;
    min-height: calc(100vh - 200px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */

.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="4"/></g></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50%, -50%); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 45px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-box h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
}

.login-box h2 {
    text-align: center;
    color: #7f8c8d;
    font-size: 18px;
    margin-bottom: 30px;
    font-weight: 400;
}

.login-info {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    font-size: 12px;
    border-left: 4px solid #667eea;
}

.login-info p {
    margin: 8px 0;
    line-height: 1.8;
}

/* =====================================================
   DASHBOARD
   ===================================================== */

.dashboard-welcome {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.dashboard-welcome.admin {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    box-shadow: 0 10px 30px rgba(142, 68, 173, 0.3);
}

.dashboard-welcome.kasir {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.3);
}

.dashboard-welcome.owner {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    box-shadow: 0 10px 30px rgba(230, 126, 34, 0.3);
}

.dashboard-welcome h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.dashboard-welcome p {
    font-size: 16px;
    opacity: 0.9;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-left: 4px solid;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stat-card.primary { border-left-color: #3498db; }
.stat-card.success { border-left-color: #2ecc71; }
.stat-card.warning { border-left-color: #f39c12; }
.stat-card.danger { border-left-color: #e74c3c; }

.stat-card .stat-label {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.dashboard-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.menu-card {
    background: white;
    border: none;
    border-radius: 15px;
    padding: 30px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.menu-card.admin::before {
    background: linear-gradient(90deg, #8e44ad 0%, #9b59b6 100%);
}

.menu-card.kasir::before {
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
}

.menu-card.owner::before {
    background: linear-gradient(90deg, #e67e22 0%, #f39c12 100%);
}

.menu-card:hover::before {
    transform: scaleX(1);
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.menu-card .card-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-card.admin .card-icon {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-card.kasir .card-icon {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-card.owner .card-icon {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
}

.menu-card p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.6;
}

/* =====================================================
   FORMS
   ===================================================== */

.form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-inline {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-inline .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* =====================================================
   TABLES
   ===================================================== */

.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.table thead {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
}

.table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tfoot {
    background: linear-gradient(135deg, #ecf0f1 0%, #d5dbdb 100%);
    font-weight: 600;
}

.text-center {
    text-align: center;
}

/* =====================================================
   ALERTS
   ===================================================== */

.alert {
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* =====================================================
   BADGES
   ===================================================== */

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
}

.badge-success {
    background-color: #27ae60;
    color: white;
}

.badge-danger {
    background-color: #e74c3c;
    color: white;
}

.badge-warning {
    background-color: #f39c12;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

/* =====================================================
   FILTER SECTION
   ===================================================== */

.filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}

/* =====================================================
   SUMMARY CARDS
   ===================================================== */

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: transform 0.5s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.card:hover::before {
    transform: scale(1.2);
}

.card h3 {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.95;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.card .big-number {
    font-size: 36px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

/* =====================================================
   TRANSACTION LAYOUT
   ===================================================== */

.transaction-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.product-section,
.cart-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.product-section h2,
.cart-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 22px;
    font-weight: 600;
}

.checkout-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.transaction-detail {
    max-width: 900px;
    margin: 0 auto;
}

.detail-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.detail-info p {
    margin: 10px 0;
}

.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .transaction-layout {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-menu {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
}

/* =====================================================
   TRANSACTION IMPROVEMENT (POS STYLE)
   ===================================================== */

/* Layout lebih tegas */
.transaction-layout {
  align-items: flex-start;
}

/* =========================
 PRODUCT SECTION
 ========================= */
.product-section {
  background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
  border-left: 6px solid var(--primary-color);
}

.product-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-section h2::before {
  content: "🛒";
  font-size: 24px;
}

/* Form tambah produk */
.product-section .form-inline {
  gap: 10px;
}

.product-section select,
.product-section input[type="number"] {
  height: 42px;
}

/* =========================
 CART SECTION
 ========================= */
.cart-section {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-left: 6px solid var(--kasir-color);
}

.cart-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-section h2::before {
  content: "🧾";
  font-size: 24px;
}

/* =========================
 CART TABLE
 ========================= */
.cart-section table {
  border-radius: 10px;
  overflow: hidden;
}

.cart-section thead {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.cart-section tbody tr {
  transition: all 0.2s ease;
}

.cart-section tbody tr:hover {
  background-color: #eef5ff;
  transform: scale(1.01);
}

/* Qty input */
.cart-section input[type="number"] {
  height: 32px;
  width: 70px;
  text-align: center;
}

/* =========================
 TOTAL ROW (HIGHLIGHT)
 ========================= */
.cart-section tfoot th {
  font-size: 16px;
}

.cart-section tfoot th:nth-child(2),
.cart-section tfoot th:nth-child(3),
.cart-section tfoot th:nth-child(4) {
  color: var(--primary-color);
}

/* =========================
 CHECKOUT FORM
 ========================= */
.checkout-form {
  background: linear-gradient(135deg, #f1f8ff 0%, #e3f2fd 100%);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #cfe2ff;
}

.checkout-form .form-group label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Payment input fokus */
.checkout-form input[type="number"] {
  font-size: 18px;
  font-weight: 600;
  text-align: right;
  background-color: #fff;
}

/* =========================
 PROSES TRANSAKSI BUTTON
 ========================= */
.checkout-form .btn-primary {
  margin-top: 15px;
  font-size: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.checkout-form .btn-primary:hover {
  background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}

/* =========================
 ACTION BUTTONS
 ========================= */
.cart-section .btn-danger {
  padding: 6px 10px;
}

.cart-section .btn-sm {
  font-weight: 500;
}

/* =========================
 EMPTY CART STATE
 ========================= */
.cart-section p {
  text-align: center;
  padding: 30px;
  font-size: 15px;
  color: #7f8c8d;
}

/* =========================
 MOBILE POS MODE
 ========================= */
@media (max-width: 768px) {
  .product-section,
  .cart-section {
      padding: 20px;
  }

  .checkout-form input[type="number"] {
      font-size: 16px;
  }

  .checkout-form .btn-primary {
      font-size: 15px;
  }
}


