/* ====== Global ====== */
:root {
  --primary: #3a6ea5;
  --primary-hover: #305c89;
  --accent: #f5b700;
  --text-dark: #1e1e1e;
  --text-light: #fafafa;
  --bg-light: #f4f5f7;
  --bg-card: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body {
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  margin: 0;
  line-height: 1.6;
  font-size: 15px;
}

/* ====== Header ====== */
.main-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  padding: 12.8px 0; /* 0.8rem */
  box-shadow: var(--shadow);
}

.main-header .container {
  width: 90%;
  max-width: 1000px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-header h1 {
  margin: 0;
  font-size: 20.8px; /* 1.3rem */
  font-weight: 600;
  color: var(--primary);
}

.main-header h1 a {
  color: var(--primary);
  text-decoration: none;
}

.main-header nav a {
  color: #555;
  margin-left: 18px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.25s ease;
}

.main-header nav a:hover {
  color: var(--primary);
}

.logout {
  color: #b74a4a !important;
}

/* ====== Flash Messages ====== */
.flash-container { margin-top: 15px; }

.flash {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-weight: 500;
  box-shadow: var(--shadow);
}
.flash.success { background: #e8f5e9; color: #256029; }
.flash.danger  { background: #fdecea; color: #a4262c; }
.flash.warning { background: #fff8e1; color: #7c6f00; }
.flash.info    { background: #e3f2fd; color: #0d47a1; }

/* ====== Form Cards ====== */
form {
  background: var(--bg-card);
  padding: 28.8px; /* 1.8rem */
  margin: 32px auto; /* 2rem */
  max-width: 500px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

form h2 {
  margin-top: 0;
  text-align: center;
  color: var(--primary);
  font-size: 22.4px; /* 1.4rem */
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6.4px; /* 0.4rem */
  color: #333;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea,
select {
  width: 95%;
  padding: 10.4px; /* 0.65rem */
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 14px; /* 1rem */
  font-size: 14px;
  background: #fff;
  transition: border 0.2s ease;
}

.content {
  height: 300px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(58, 110, 165, 0.1);
}

.checkbox-item {
  display: inline-block;
  margin: 6px 10px 6px 0;
}

/* ====== Buttons ====== */
.btn,
.form-btn,
input[type="submit"] {
  background: var(--primary);
  color: var(--text-light);
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn:hover,
.form-btn:hover,
input[type="submit"]:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background: #ddd;
}

/* ====== Draft Cards ====== */
.drafts-container {
  margin: 20px auto;
  width: 90%;
  max-width: 1000px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.drafts-container h2 {
  margin-top: 0;
  color: var(--primary);
  margin-bottom: 15px;
}

.draft-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.draft-table th, .draft-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: middle;
}

.draft-table th {
  background: #f8f9fa;
  color: #444;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12.8px; /* ~0.8rem */
}

.draft-table tr:hover {
  background: #f9f9f9;
}

.platform-badge {
  display: inline-block;
  padding: 4.8px 9.6px; /* 0.3rem 0.6rem */
  border-radius: 12px;
  font-size: 10px;
  color: white;
  margin-right: 4.8px;
}

.platform-time {
  font-size: 11px;
}

.platform-facebook { background: #3b5998; }
.platform-x { background: #000; }
.platform-wordpress { background: #21759b; }

.actions {
  text-align: right;
}

.btn-small {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 5px;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-small.success {
  background: #28a745;
  height: 25px;
}

.btn-small:hover {
  background: var(--primary-hover);
}

.btn-small.success:hover {
  background: #218838;
}

.draft-form {
  display:inline;
  background: none;
  border: none;
  box-shadow: none;
}

/* ====== Footer ====== */
footer {
  text-align: center;
  padding: 10px 0;
  font-size: 0.85em;
  color: #777;
  border-top: 1px solid #eee;
  margin-top: 40px;
}

/* ====== Responsive ====== */
@media (max-width: 700px) {
  .main-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-header nav {
    margin-top: 10px;
  }

  .main-header nav a {
    display: inline-block;
    margin: 4px 10px 0 0;
  }
}

/* ====== Dashboard Table ====== */
.dashboard-container {
  margin: 20px auto;
  width: 90%;
  max-width: 1000px;
  background: var(--bg-card);
  padding: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.dashboard-container h2 {
  margin-top: 0;
  color: var(--primary);
  margin-bottom: 15px;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.dashboard-table th, .dashboard-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: middle;
}

.dashboard-table th {
  background: #f8f9fa;
  color: #444;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12.8px;
}

.dashboard-table tr:hover {
  background: #f9f9f9;
}

.platform-checkboxes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.checkbox-item:hover {
  background: #e9ecef;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 6px;
}

.checkbox-label {
  font-weight: 500;
}

@keyframes blink-red {
  0%, 100% {
    text-shadow: 
      0 0 2px red,
      0 0 5px red,
      0 0 8px red;
  }
  50% {
    text-shadow: 
      0 0 5px darkred,
      0 0 10px darkred,
      0 0 15px darkred;
  }
}

.blink-red {
  color: white;
  animation: blink-red 1s infinite;
}


/* ====== Log Table ====== */

.main {
  height: 80vh; 
  overflow-y: scroll; 
  background-color: #fff; 
  border: 1px solid #ccc; 
  padding: 10px;
}

.log-headings {
  position: sticky; 
  top: 0; 
  background-color: #f0f0f0; 
  padding: 8px 12px;
}

.log-items {
  padding: 8px 12px;
   font-size: 11px;
}