/* IT Guys Design System */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --card-bg: #f5f5f5;
  --border: #d0d0d0;
  --border-input: #949494;
  --text: #1a1a1a;
  --text-heading: #2c2c2d;
  --text-muted: #444444;
  --accent: #003399;
  --accent-hover: #0044cc;
  --accent-light: #e6eeff;
  --red: #D5121A;
  --red-hover: #b70f16;
  --success: #27ae60;
  --warning: #e67e22;
  --dark: #2c2c2d;
  --radius: 0.75rem;
  --radius-sm: 4px;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Header */
header {
  background: var(--dark);
  color: #fff;
  padding: 0 1.5rem;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 2px;
}
nav { display: flex; gap: 1rem; align-items: center; }
nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-family: 'Roboto', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}
nav a:hover { color: #fff; }

/* Footer */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 1rem 1.5rem;
  margin-top: auto;
  font-size: 0.85rem;
  text-align: center;
}

/* Main */
main { flex: 1; padding: 2rem 1.5rem; }
.container { max-width: 1200px; margin: 0 auto; }
.container.wide { max-width: 1400px; }
.container.narrow { max-width: 720px; }

/* Typography */
h1, h2, h3 {
  font-family: 'Roboto', sans-serif;
  color: var(--text-heading);
  letter-spacing: 1px;
}
h1 { font-size: 1.8rem; text-transform: uppercase; margin-bottom: 1.5rem; }
h2 { font-size: 1.4rem; text-transform: uppercase; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.card-white {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Buttons */
.btn, button[type="submit"] {
  font-family: 'Roboto', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}
.btn-primary, button[type="submit"] {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover, button[type="submit"]:hover {
  background: var(--accent-hover);
}
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { color: #fff; border-color: #fff; }
.btn-secondary {
  background: var(--dark);
  color: #fff;
}
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.75rem; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  font-weight: 500;
}
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="number"], select, textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-input);
  border-radius: 0.5rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,51,153,0.25);
}

/* Tables */
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--dark);
  color: #fff;
  font-family: 'Roboto', sans-serif;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  padding: 0.75rem 1rem;
  text-align: left;
}
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
}
tr:nth-child(even) { background: #f7f7f7; }
tr:hover { background: var(--accent-light); }

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-error { background: rgba(213,18,26,0.1); color: var(--red); border: 1px solid rgba(213,18,26,0.2); }
.alert-success { background: rgba(39,174,96,0.1); color: var(--success); border: 1px solid rgba(39,174,96,0.2); }
.alert-info { background: var(--accent-light); color: var(--accent); border: 1px solid rgba(0,51,153,0.2); }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab {
  padding: 0.75rem 1.5rem;
  font-family: 'Roboto', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.tab:hover { color: var(--text-heading); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Badge */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-admin { background: var(--accent-light); color: var(--accent); }
.badge-active { background: rgba(39,174,96,0.12); color: var(--success); }
.badge-inactive { background: rgba(0,0,0,0.06); color: #888; }

/* Login page */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}
.login-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.login-box h1 { text-align: center; font-size: 1.4rem; margin-bottom: 0.5rem; }
.login-box .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }

/* Dashboard app cards */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.app-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-top: 3px solid var(--accent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.app-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.app-card h3 { margin-bottom: 0.5rem; }
.app-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

/* Access matrix */
.matrix-table td { text-align: center; }
.matrix-table th:first-child, .matrix-table td:first-child { text-align: left; }

/* Utility */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal h2 { margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.5rem; }

@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 0.75rem 0; gap: 0.5rem; }
  nav { flex-wrap: wrap; justify-content: center; }
  .app-grid { grid-template-columns: 1fr; }
  .login-box { margin: 1rem; }
}
