/* css/common.css — Shared design system for DISAG EMS */

/* ── Variables ── */
:root {
  --primary:   #00f2fe;
  --secondary: #4facfe;
  --bg:        #0a0b1e;
  --text:      #ffffff;
  --accent:    #ff007c;
  --success:   #00ffa3;
  --warn:      #ffb300;
  --glass:     rgba(255, 255, 255, 0.04);
  --border:    rgba(255, 255, 255, 0.09);
  --card-dark: rgba(0, 0, 0, 0.25);
}

/* ── Reset ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

/* ── Body ── */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 15% 25%, rgba(79,172,254,.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(255,0,124,.10)  0%, transparent 45%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Layout ── */
.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 2rem;
}

/* ── Header ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.8rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

/* ── Buttons ── */
.btn {
  padding: .65rem 1.3rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: .25s;
  font-size: .83rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
}
.btn-primary:hover {
  box-shadow: 0 5px 18px rgba(0,242,254,.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-accent {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent);
  color: #fff;
}

.btn-success {
  background: rgba(0,255,163,.12);
  border: 1px solid rgba(0,255,163,.3);
  color: var(--success);
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: .45rem .9rem;
  font-size: .75rem;
}
.btn-danger:hover {
  background: var(--accent);
  color: #fff;
}

.btn-sm {
  padding: .45rem .9rem;
  font-size: .75rem;
}

/* ── Status dot ── */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
  display: inline-block;
  transition: .5s;
}
.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pls 2s infinite;
}

@keyframes pls {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ── Section title ── */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

/* ── Form elements ── */
input[type="text"],
input[type="number"],
input[type="date"] {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  padding: .75rem 1.1rem;
  border-radius: 10px;
  color: #fff;
  outline: none;
  font-family: 'Outfit', sans-serif;
  font-size: .88rem;
  transition: .3s;
  width: 100%;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
  border-color: var(--primary);
}

select {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: .87rem;
}
select option {
  background: #111;
}

.form-label {
  font-size: .8rem;
  opacity: .65;
  margin-bottom: .4rem;
  display: block;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-overlay.active {
  display: flex;
}
.modal {
  background: #111327;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  width: 90%;
  max-width: 460px;
}
.modal h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--secondary);
}
.form-group {
  margin-bottom: 1.2rem;
}
.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.modal-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ── Clock ── */
.clock-disp {
  font-size: .85rem;
  opacity: .5;
  letter-spacing: 1px;
}
