@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=DM+Serif+Display&display=swap');

:root {
  --primary: #F7E9D7;    /* Brand Cream */
  --secondary: #A0B392;  /* Brand Sage Green */
  --accent: #E58D67;     /* Brand Rust/Orange */
  --dark: #2C3531;       /* Deep Forest Green/Dark */
  --dark-hover: #3a4742;
  --text-main: #333333;
  --text-light: #666666;
  --bg-light: #F9F9F9;
  --bg-white: #FFFFFF;
  --danger: #d9534f;
  --success: #5cb85c;
  --border: #E0E0E0;
  
  --font-heading: 'DM Serif Display', serif;
  --font-body: 'DM Sans', sans-serif;
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background-color: var(--bg-light); color: var(--text-main); line-height: 1.5; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--dark); font-weight: normal; }
a { text-decoration: none; color: var(--accent); }
a:hover { text-decoration: underline; }

/* Utility */
.hidden { display: none !important; }
.btn { 
  display: inline-block; padding: 10px 20px; border: none; border-radius: 4px; 
  cursor: pointer; font-family: var(--font-body); font-weight: 500; transition: 0.2s; 
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #d17852; }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }

/* Login Screen */
#login-screen {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--dark); color: var(--bg-white);
}
.login-box {
  background: var(--bg-white); color: var(--text-main); padding: 40px; 
  border-radius: 8px; width: 100%; max-width: 400px; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.login-box h2 { margin-bottom: 24px; color: var(--dark); }
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 4px; font-family: var(--font-body);
}
.login-btn { width: 100%; margin-top: 10px; }

/* Dashboard Layout */
#app-screen { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar {
  width: 250px; background: var(--dark); color: white; display: flex; flex-direction: column;
}
.sidebar-header { padding: 20px; font-family: var(--font-heading); font-size: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nav-links { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-link {
  display: block; padding: 12px 20px; color: rgba(255,255,255,0.7); cursor: pointer; transition: 0.2s; border-left: 3px solid transparent;
}
.nav-link:hover, .nav-link.active { background: var(--dark-hover); color: white; border-left-color: var(--accent); }
.sidebar-footer { padding: 20px; font-size: 0.85rem; border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }
.sidebar-footer a { color: var(--primary); cursor: pointer; }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; background: var(--bg-light); }
.topbar {
  background: var(--bg-white); padding: 15px 30px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.content-area { padding: 30px; flex: 1; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h2 { font-size: 2rem; margin-bottom: 0; }

/* Data Tables */
.table-wrap { background: var(--bg-white); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 20px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-light); font-weight: 600; color: var(--text-light); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; }
tr:hover td { background: rgba(0,0,0,0.02); }
td img { max-width: 60px; max-height: 60px; object-fit: cover; border-radius: 4px; }
.action-btn { background: transparent; border: none; cursor: pointer; color: var(--text-light); margin-right: 10px; font-size: 1.1rem; }
.action-btn:hover { color: var(--dark); }
.delete-btn:hover { color: var(--danger); }

/* Modals */
.modal-overlay {
  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: 1000;
}
.modal {
  background: var(--bg-white); width: 100%; max-width: 500px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  max-height: 90vh; overflow-y: auto;
}
.modal-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 1.4rem; margin: 0; }
.close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-light); }
.modal-body { padding: 20px; }
.modal-footer { padding: 20px; border-top: 1px solid var(--border); text-align: right; }

/* Alerts */
.alert { padding: 12px 20px; border-radius: 4px; margin-bottom: 20px; display: none; }
.alert-error { background: #fde8e8; color: var(--danger); border: 1px solid #f9c2c2; }
.alert-success { background: #e8fdf0; color: var(--success); border: 1px solid #c2f9d6; }
