/* =========================
   RESET & ROOT
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root{
  --green:#16a34a;
  --green-dark:#166534;
  --bg:#f0fdf4;
  --card:#ffffff;
  --text:#064e3b;
}

/* =========================
   BODY & GLOBAL
========================= */
body{
  font-family:'Segoe UI',system-ui,sans-serif;
  background:var(--bg);
  color:var(--text);
}

.center{
  display:flex;
  justify-content:center;
  align-items:center;
  height:100vh;
}

/* =========================
   APP LAYOUT
========================= */
.app{
  display:flex;
  min-height:100vh;
}

/* =========================
   SIDEBAR
========================= */
.sidebar{
  width:240px;
  background:linear-gradient(180deg,var(--green),var(--green-dark));
  color:#fff;
  padding:24px;
}

.sidebar h2{
  margin-bottom:24px;
}

/* MENU */
.menu{
  display:block;
  padding:12px 16px;
  border-radius:12px;
  color:white;
  text-decoration:none;
  margin-bottom:10px;
  transition:.25s;
}

.menu:hover,
.menu.active{
  background:rgba(255,255,255,.2);
}

/* DROPDOWN */
.dropdown-title{
  cursor:pointer;
  margin-bottom:8px;
  padding:12px 16px;
  border-radius:12px;
  background:rgba(255,255,255,.15);
  font-weight:600;
}

.dropdown-content{
  display:none;
  margin-left:8px;
}

.dropdown-content.open{
  display:block;
}

.dropdown-content a{
  display:block;
  padding:10px 14px;
  border-radius:10px;
  color:white;
  text-decoration:none;
}

.dropdown-content a:hover{
  background:rgba(255,255,255,.2);
}

/* =========================
   MAIN CONTENT
========================= */
.main{
  flex:1;
  padding:30px;
}

/* =========================
   TOP BAR
========================= */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:24px;
}

#search{
  width:60%;
  padding:14px;
  border-radius:14px;
  border:1px solid #bbf7d0;
}

/* =========================
   STATS
========================= */
.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-bottom:24px;
}

.stats div{
  background:var(--card);
  padding:18px;
  border-radius:18px;
  text-align:center;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}

/* =========================
   CARD
========================= */
.card{
  background:var(--card);
  border-radius:20px;
  padding:24px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
}

/* =========================
   TABLE
========================= */
table{
  width:100%;
  border-collapse:collapse;
}

th{
  padding:14px;
  border-bottom:2px solid #dcfce7;
  text-align:left;
}

td{
  padding:14px;
  border-bottom:1px solid #e5e7eb;
}

/* BADGE */
.badge{
  background:#dcfce7;
  color:#166534;
  padding:6px 14px;
  border-radius:20px;
  font-size:12px;
  font-weight:700;
}

/* BUTTON ICON */
.btn{
  font-size:18px;
  text-decoration:none;
  margin-right:8px;
  transition:.2s;
}

.btn:hover{
  transform:scale(1.15);
}

/* =========================
   MODAL PREVIEW
========================= */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  justify-content:center;
  align-items:center;
  z-index:999;
}

.modal-content{
  background:white;
  width:80%;
  max-width:900px;
  border-radius:18px;
  padding:20px;
  position:relative;
}

.preview-img,
.preview-video,
.preview-frame{
  width:100%;
  border-radius:12px;
}

/* =========================
   DARK MODE
========================= */
body.dark{
  background:#022c22;
  color:#ecfdf5;
}

body.dark .card,
body.dark .stats div,
body.dark .modal-content{
  background:#020617;
  color:#ecfdf5;
}

body.dark th,
body.dark td{
  border-color:#14532d;
}

/* =========================
   RESPONSIVE (MOBILE)
========================= */
@media(max-width:768px){
  .app{
    flex-direction:column;
  }

  .sidebar{
    width:100%;
  }

  #search{
    width:100%;
  }

  .stats{
    grid-template-columns:repeat(2,1fr);
  }
}

/* ===============================
   GLOBAL LINK & ICON RESET
=============================== */
a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: none;
}

/* ICON ACTION (👁️ ⭐ 🗑️) */
.action-icon {
  font-size: 18px;
  margin-right: 8px;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}

.action-icon:hover {
  transform: scale(1.2);
  opacity: 0.85;
}

/* ===============================
   MODERN BUTTON VARIANTS
=============================== */
.btn-primary {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  padding: 10px 18px;
  border-radius: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(22,163,74,.35);
  transition: all .25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(22,163,74,.45);
}

.btn-primary,
.btn-secondary {
  text-decoration: none;
  width: 100%;
  justify-content: center;
}

.btn-secondary {
  background: #ecfdf5;
  color: #166534;
  padding: 10px 18px;
  border-radius: 14px;
  font-weight: 600;
  border: 1px solid #bbf7d0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: .2s;
}

.btn-secondary:hover {
  background: #dcfce7;
}

/* ===============================
   FORM MODERN (LOGIN / UPLOAD / NOTES)
=============================== */
.page-center {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-card {
  background: var(--card);
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(0,0,0,.12);
}

.form-card h2 {
  margin-bottom: 20px;
  text-align: center;
}

.form-card input,
.form-card textarea,
.form-card select {
  width: 100%;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid #bbf7d0;
  font-size: 14px;
}

.form-card textarea {
  resize: vertical;
}
