body {
  font-family: Arial, sans-serif;
  background: #f2f2f2;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #f2f2f2;
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.login-container {
  background: #ffffff;
  padding: 30px 40px;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  width: 100%;
  max-width: 400px;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  flex: 1;
  width: 100%; 
  box-sizing: border-box;
}

.password-wrapper i {
  position: absolute;
  right: 10px;
  color: #555;
}

form input {
  margin-bottom: 15px;
  padding: 10px;
  font-size: 14px;
}

form button {
  padding: 10px;
  background-color: #4285f4;
  color: white;
  border: none;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
}

form p {
  text-align: center;
  margin-top: 10px;
}

.login-container h2 {
  margin-bottom: 20px;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
}

form label {
  margin-bottom: 5px;
  font-weight: bold;
}

form button:hover {
  background-color: #3367d6;
}

.error {
  color: red;
  text-align: center;
  margin-bottom: 15px;
}

form p a {
  color: #007bff;
  text-decoration: none;
}

form p a:hover {
  text-decoration: underline;
}

.success {
  background-color: #e0f8e0;
  border: 1px solid #2ecc71;
  padding: 10px;
  color: #2e7d32;
  border-radius: 5px;
  margin-bottom: 15px;
  text-align: center;
}

.container {
    max-width: 1000px; 
    width: 90%; 
    margin: 30px auto; 
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 20px 30px;
    box-sizing: border-box; 
}

.header-produk-list {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px; 
    border-bottom: 1px solid #eee; 
}

.header-produk-list h2 {
    margin: 0; 
    color: #333;
    font-size: 24px;
    text-align: left; 
}

.actions {
    display: flex;
    gap: 10px; 
}

.actions a {
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px; 
    transition: background 0.3s ease; 
}

.btn-primary {
    background: #007bff; 
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d; 
}

.btn-secondary:hover {
    background: #5a6268;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden; 
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

th {
    background: #f2f2f2;
    text-align: center; 
}

tr:hover {
    background-color: #f9f9f9;
}

img {
    max-width: 60px;
    height: auto; 
    border-radius: 5px;
    object-fit: cover;
}

.btn-edit {
    background: #28a745;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px; 
    margin-right: 5px; 
}

.btn-hapus {
    background: #dc3545;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.btn-edit:hover {
    background: #218838;
}

.btn-hapus:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        margin: 20px auto;
        padding: 15px 15px;
    }

    .header-produk-list {
        flex-direction: column;
        align-items: flex-start; 
        gap: 10px; 
    }

    .header-produk-list h2 {
        font-size: 20px;
    }

    .actions {
        width: 100%; 
        justify-content: flex-start; 
        flex-wrap: wrap; 
    }

    .actions a {
        flex-grow: 1;
        text-align: center; 
        margin: 5px 0; 
    }

    table, thead, tbody, th, td, tr {
        display: block; 
    }


    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #ddd;
        margin-bottom: 10px;
        border-radius: 5px;
        overflow: hidden;
    }

    td {
        border: none; 
        border-bottom: 1px solid #eee; 
        position: relative;
        padding-left: 50%; 
        text-align: right;
    }

    td:last-child {
        border-bottom: none; 
    }

    td:before {
        content: attr(data-label); 
        position: absolute;
        left: 0;
        width: 45%;
        padding-left: 15px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #555;
    }

   .produk-table td:nth-of-type(1):before { content: "No"; }
   .produk-table td:nth-of-type(2):before { content: "Gambar"; }
   .produk-table td:nth-of-type(3):before { content: "Nama"; }
   .produk-table td:nth-of-type(4):before { content: "Harga"; }
   .produk-table td:nth-of-type(5):before { content: "Aksi"; }


    img {
        max-width: 80px; 
        display: block;
        margin: 5px auto;
    }
}

h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 40px;
    font-size: 2.2em;
    font-weight: 600;
}

form {
    margin: 0;
    padding: 0;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 12px;
    color: #495057;
    font-size: 1.05em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group textarea,
.form-group input[type="file"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #333;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input[type="file"] {
    padding: 10px;
    background: #f8f9fa;
    border: 1px dashed #ced4da;
}

.file-input-wrapper {
    display: flex;
    align-items: center;
}

.file-input-wrapper input[type="file"] {
    flex-grow: 1;
}

.file-input-wrapper::after {
    content: 'Browse';
    background: #e9ecef;
    padding: 10px 16px;
    border-radius: 0 6px 6px 0;
    margin-left: -1px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

form button[type="submit"] {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 1.1em;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button[type="submit"]:hover {
    background-color: #3a7bc8;
}

.button-cancel {
    background-color: #f8f9fa;
    color: #495057;
    text-decoration: none;
    padding: 14px 30px;
    font-size: 1.1em;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #333;
}

.button-cancel:hover {
    background-color: #e9ecef;
    border-color: #d0d0d0;
}

.error {
    color: #e74c3c;
    margin: -10px 0 25px 0;
    text-align: center;
    font-weight: 500;
    padding: 12px;
    background: #fde8e8;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }
    
    h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    form button[type="submit"],
    .button-cancel {
        width: 100%;
    }
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between; 
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 1rem;
    text-align: center;
    display: inline-block;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}


.btn-new {
    background-color: #4a90e2;
    color: white;
    order: 2;
}

.btn-new:hover {
    background-color: #3a7bc8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-third {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #333;
    order: 1; 
}

.btn-third:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.8rem;
        order: 0; 
    }
}

.btn-fourth {
    background-color: #f8f9fa;
    color: #495057;
    padding: 0.8rem 1.5rem;
    border: 1px solid #333;
    border-radius: 1px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: block;
    width: 10%;
    max-width: 300px; 
    display: block; 
    margin-top: 0.5rem;
}

.btn-fourth:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button[type="submit"] {
    margin-top: 0;
}

.header-2 {
    width: 100%; 
    display: flex;
    margin-top: -20px;
    padding-top: 0;
    justify-content: space-between;
    align-items: center;
    background-color: #3498db;
    color: white;
    padding: 15px 20px; 
    border-radius: 0;
    box-sizing: border-box; 
}

.container-2 {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    background: white;
    border-radius: 0;
    box-shadow: none;
    padding: 30px 1%;
    box-sizing: border-box;
}

.header-2 h1 {
  margin: 0;
  font-size: 24px;
}

.logout {
  background-color: #e74c3c;
  color: white;
  padding: 8px 14px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}

.logout:hover {
  background-color: #c0392b;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.box {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.box h2 {
  margin-top: 0;
  font-size: 20px;
  margin-bottom: 15px;
  color: #333;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.menu-list li {
  width: 100%;
  max-width: 250px;
}

.menu-list a {
  display: block;
  width: 100%;
  background-color: #3498db;
  color: white;
  padding: 12px 2px;
  text-align: center;
  border-radius: 6px;
  justify-content: center;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease;
}

.menu-list a:hover {
  background-color: #2980b9;
}

.stat-card {
  background-color: #ecf0f1;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.stat-card p {
  margin: 0;
  color: #555;
  font-size: 16px;
}

.stat-card strong {
  font-size: 24px;
  display: block;
  margin-top: 5px;
  color: #2c3e50;
}

.activity-wrapper {
  padding: 0 30px;
  overflow-x: auto;
  font-size: 15px;
}

.activity-wrapper h2 {
    font-size: 20px;
    color: #333;
}

.activity-list {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.activity-text {
  text-align: left;
  padding: 12px 10px;
  color: #000000;
}

.activity-time {
  text-align: right;
  padding: 12px 20px;
  color: #000000;
  font-size: 13px;
  white-space: nowrap;
  min-width: 120px;
}

.activity-list tr {
  border-bottom: 1px solid #ddd;
}


@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 20px 15px;
    margin: 15px auto;
    box-sizing: border-box;
  }

  h2 {
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 20px;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-group label {
    font-size: 0.95em;
  }

  .form-group input,
  .form-group textarea,
  .form-group input[type="file"] {
    font-size: 1em;
    padding: 10px 12px;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .form-actions button,
  .form-actions a {
    width: 100%;
    font-size: 1em;
    padding: 14px;
    text-align: center;
    border-radius: 8px;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  .button-group {
    flex-direction: column;
    gap: 12px;
  }

  .button-group .btn {
    width: 100%;
    padding: 14px;
    font-size: 1.1em;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  form button,
  form a.btn-fourth {
    width: 100%;
    display: block;
    text-align: center;
    box-sizing: border-box;
    padding: 14px 30px;
    font-size: 1.1em;
    font-weight: 500;
    border-radius: 8px;
    margin-top: 10px;
  }

  form a.btn-fourth {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    text-decoration: none;
  }

  form a.btn-fourth:hover {
    background-color: #e2e6ea;
    border-color: #adb5bd;
  }
}

