* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
}
.hidden { display: none !important; }
.view { min-height: 100vh; }

/* Login */
#login-view { display: flex; align-items: center; justify-content: center; }
.login-card { width: 380px; text-align: center; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 4px; color: #1E5AA8; }
.subtitle { color: #666; margin-bottom: 24px; }

/* Cards */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 24px;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-header h2 { font-size: 1.15rem; color: #1E5AA8; }

/* Topbar */
.topbar {
  background: #1E5AA8;
  color: #fff;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar h1 { font-size: 1.3rem; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.container { max-width: 1200px; margin: 24px auto; padding: 0 24px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat {
  background: #fff; border-radius: 10px; padding: 20px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.stat .num { font-size: 2rem; font-weight: 700; color: #1E5AA8; }
.stat .lbl { color: #666; font-size: 0.85rem; margin-top: 4px; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.table th { background: #f8f9fa; color: #555; font-weight: 600; }
.table tr:hover { background: #f8f9fa; }

/* Badges */
.badge { padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge.AKTIF, .badge.TRIAL { background: #e6f4ea; color: #1e7e34; }
.badge.GRACE_PERIOD { background: #fff4e5; color: #b26a00; }
.badge.EXPIRED, .badge.INVALID { background: #fdecea; color: #c62828; }

/* Forms */
label { display: block; margin: 12px 0 4px; font-size: 0.85rem; color: #555; font-weight: 600; }
input, select {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 0.95rem;
}
input:focus, select:focus { outline: none; border-color: #1E5AA8; }

/* Buttons */
.btn {
  padding: 10px 18px; border: none; border-radius: 6px; font-size: 0.9rem; cursor: pointer; font-weight: 600;
}
.btn.primary { background: #1E5AA8; color: #fff; }
.btn.primary:hover { background: #164a8a; }
.btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn.small { padding: 6px 12px; font-size: 0.8rem; }
.btn.danger { background: #c62828; color: #fff; }
.btn.edit { background: #1565c0; color: #fff; margin-right: 6px; }

/* Modal */
.modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-content {
  background: #fff; border-radius: 10px; padding: 28px; width: 480px; max-width: 95%;
  max-height: 90vh; overflow-y: auto; position: relative;
}
.modal-close { position: absolute; top: 12px; right: 16px; font-size: 1.6rem; cursor: pointer; color: #888; }

.error { color: #c62828; margin-top: 12px; font-size: 0.85rem; }
