/* ===============================
   CONNECTXIA – MASTER STYLE
   Fast • Clean • PHP-only
================================ */

/* ---------- ROOT VARIABLES ---------- */
:root {
  --brand: #55206E;
  --brand-dark: #3f1752;
  --bg: #f4f6f8;
  --white: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 8px;
}

/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* ---------- LINKS ---------- */
a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- LAYOUT ---------- */
.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

/* ---------- HEADER ---------- */
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-nav a {
  margin-right: 16px;
  font-weight: 500;
}

.header-user {
  font-size: 14px;
}

.logout-link {
  margin-left: 10px;
  color: var(--danger);
  font-weight: 600;
}

/* ---------- FOOTER ---------- */
.app-footer {
  margin-top: 40px;
  padding: 20px 0;
  background: #f9fafb;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.footer-links a {
  margin: 0 6px;
  color: #374151;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* ---------- GRID ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.grid .card h3 {
  font-size: 28px;
  color: var(--brand);
}

.grid .card p {
  color: var(--muted);
}

/* ---------- FORMS ---------- */
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 15px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(85, 32, 110, 0.15);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: none;
  background: var(--brand);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: var(--brand-dark);
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: #b91c1c;
}

/* ---------- TABLE ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table th {
  background: #f9fafb;
  font-weight: 600;
}

/* ---------- LOGIN / REGISTER ---------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--brand),
    var(--brand-dark)
  );
}

.login-wrapper .card {
  width: 100%;
  max-width: 420px;
}

.logo {
  margin-bottom: 25px;
}

.links {
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
}

.footer {
  margin-top: 20px;
  font-size: 13px;
  color: #e5e7eb;
  text-align: center;
}

.footer a {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- MESSAGES ---------- */
.error {
  color: var(--danger);
  margin-bottom: 10px;
  font-size: 14px;
}

.success {
  color: var(--success);
  margin-bottom: 10px;
  font-size: 14px;
}

/* ---------- UTILITIES ---------- */
.mt-20 {
  margin-top: 20px;
}

.welcome {
  margin-bottom: 20px;
  color: #374151;
}

.action-list {
  list-style: none;
}

.action-list li {
  margin-bottom: 10px;
}
.editor {
  border: 1px solid #e5e7eb;
  padding: 10px;
  min-height: 120px;
  border-radius: 6px;
  background: #fff;
}
.action-icons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.action-icons a {
  color: #374151;
  font-size: 16px;
  text-decoration: none;
}

.action-icons a:hover {
  color: var(--brand);
}

.action-icons a.danger:hover {
  color: #dc2626;
}
.badge {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 600;
}

.badge.success {
  background: #dcfce7;
  color: #166534;
}

.badge.muted {
  background: #f3f4f6;
  color: #6b7280;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #374151;
}

.icon-btn:hover {
  color: var(--brand);
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 9999;
}

.modal-content {
  background: #fff;
  width: 95%;
  max-height: 90vh;
  margin: 3% auto;
  padding: 20px;
  overflow: hidden;
  border-radius: 8px;
}

.table-scroll {
  overflow-x: auto;
  max-height: 60vh;
  border: 1px solid #e5e7eb;
}

.excel-table input,
.excel-table select {
  width: 140px;
  font-size: 13px;
}
