/* === RESET DASAR === */
* {
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
}

body {
  background: #f3f6fb;
  color: #1e293b;
}

/* === SIDEBAR === */
.sidebar {
  width: 240px;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, #2563eb, #1e40af);
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0,0,0,0.15);
}

.sidebar-header {
  text-align: center;
  font-weight: 700;
  font-size: 1.4rem;
  padding: 1.4rem 0;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar a {
  display: block;
  padding: 12px 20px;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(255,255,255,0.15);
}

.logout {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.logout a {
  display: block;
  padding: 12px 20px;
  color: #fca5a5;
  font-weight: 500;
}

/* === MAIN === */
.main {
  margin-left: 240px;
  padding: 25px 35px;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #1e40af;
}

h3 {
  font-size: 1.1rem;
  margin: 20px 0 8px;
  color: #1e3a8a;
}

/* === CARD === */
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
  margin-bottom: 25px;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

/* === ALERTS === */
.alert-success {
  background: #e1f5e2;
  border-left: 4px solid #22c55e;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  color: #14532d;
  font-size: 0.9rem;
}

.alert-error {
  background: #fee2e2;
  border-left: 4px solid #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  color: #7f1d1d;
  font-size: 0.9rem;
}

/* === FORM SHORTLINK === */
.shortlink-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.shortlink-form input[type=url] {
  flex: 1;
  padding: 14px 18px;
  border-radius: 30px;
  border: 1px solid #d0d7e6;
  background: #f9fbff;
  font-size: 15px;
  transition: border 0.2s, box-shadow 0.2s;
}
.shortlink-form input[type=url]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
  outline: none;
}

.shortlink-form button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(29,78,216,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.shortlink-form button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(29,78,216,0.4);
}

.new-link-box {
  background: #eef7ff;
  border: 1px solid #b9daff;
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  margin-bottom: 15px;
}

.new-link-box a {
  color: #1d4ed8;
  font-weight: 600;
}

.copy-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.copy-btn:hover {
  background: #1d4ed8;
}

/* === TABLE === */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th, .table td {
  padding: 10px;
  border-bottom: 1px solid #e5e9f2;
  vertical-align: middle;
}
.table th {
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
  color: #475569;
}
.table-striped tbody tr:nth-child(even) { background: #f9fbff; }
.table-striped tbody tr:hover { background: #eef4ff; }

/* === BUTTONS === */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

.btn-small {
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger {
  background: #dc2626;
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
}
.btn-small.btn-primary {
  background: #2563eb;
  color: #fff;
}
.btn-small.btn-primary:hover {
  background: #1d4ed8;
}

/* === EDIT DETAIL FORM === */
.details-edit summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 500;
  font-size: 0.85rem;
}
.details-edit summary:hover { text-decoration: underline; }
.details-edit form {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.details-edit input[type="text"] {
  flex: 1;
  min-width: 150px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: #334155;
}

/* === RESPONSIVE === */
@media(max-width: 900px){
  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0.6rem 1rem;
    overflow-x: auto;
  }
  .sidebar-header {
    font-size: 1rem;
    margin-right: 1rem;
    border-bottom: none;
  }
  .main {
    margin-left: 0;
    padding: 20px;
  }
  .sidebar a { padding: 10px 14px; font-size: 0.85rem; }
}


