/*
Theme Name: Admin Login
Description: Minimal theme that displays the WordPress login form on the front page and a portal for Command Center.
Version: 1.107
Author: Nicholas Blanton
*/

/* ===================== RESET ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===================== LOGIN PAGE ===================== */
body:not(.portal-body) {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #1d2327;
  color: #c3c4c7;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-wrapper {
  background: #2c3338;
  padding: 40px;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.login-wrapper h1 {
  text-align: center;
  margin-bottom: 24px;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
}

.login-wrapper label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #c3c4c7;
}

.login-wrapper input[type="text"],
.login-wrapper input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid #50575e;
  border-radius: 4px;
  background: #1d2327;
  color: #fff;
  font-size: 15px;
}

.login-wrapper input[type="text"]:focus,
.login-wrapper input[type="password"]:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

.login-wrapper .login-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
}

.login-wrapper input[type="submit"] {
  width: 100%;
  padding: 10px;
  background: #2271b1;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.login-wrapper input[type="submit"]:hover {
  background: #135e96;
}

.login-wrapper .login-error {
  background: #d63638;
  color: #fff;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.login-wrapper .login-links {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

.login-wrapper .login-links a {
  color: #72aee6;
  text-decoration: none;
}

.login-wrapper .login-links a:hover {
  text-decoration: underline;
}

/* ===================== PORTAL LAYOUT ===================== */
.portal-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f0f0f1;
  color: #1d2327;
  min-height: 100vh;
}

/* ---- NAV BAR ---- */
.portal-nav {
  background: #1d2327;
  border-bottom: 3px solid #2271b1;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.portal-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 52px;
  gap: 8px;
}

.portal-nav-brand {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  margin-right: 24px;
  white-space: nowrap;
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.portal-nav-links a {
  color: #c3c4c7;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.portal-nav-links a:hover {
  background: #2c3338;
  color: #fff;
}

.portal-nav-links a.active {
  background: #2271b1;
  color: #fff;
}

.portal-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-admin-link {
  color: #c3c4c7;
  text-decoration: none;
  font-size: 13px;
  padding: 5px 12px;
  border: 1px solid #50575e;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.nav-admin-link:hover {
  background: #2c3338;
  color: #fff;
}

.nav-logout-link {
  color: #c3c4c7;
  text-decoration: none;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.nav-logout-link:hover {
  background: #d63638;
  color: #fff;
}

/* ---- CONTENT AREA ---- */
.portal-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.portal-content .wrap {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.portal-content .wrap h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1d2327;
}

.portal-content .wrap h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: #1d2327;
}

.portal-content .wrap h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: #1d2327;
}

/* ===================== TABLES ===================== */
.portal-content .widefat {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #dcdcde;
  font-size: 13px;
  margin-top: 8px;
}

.portal-content .widefat th,
.portal-content .widefat td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.portal-content .widefat th {
  background: #f6f7f7;
  font-weight: 600;
  color: #1d2327;
  white-space: nowrap;
}

.portal-content .widefat th a {
  color: #2271b1;
  text-decoration: none;
}

.portal-content .widefat th a:hover {
  color: #135e96;
  text-decoration: underline;
}

.portal-content .widefat.striped tbody tr:nth-child(odd) {
  background: #f9f9f9;
}

.portal-content .widefat.striped tbody tr:nth-child(even) {
  background: #fff;
}

.portal-content .widefat tbody tr:hover {
  background: #f0f6fc;
}

.portal-content .widefat td a {
  color: #2271b1;
  text-decoration: none;
}

.portal-content .widefat td a:hover {
  color: #135e96;
  text-decoration: underline;
}

/* ===================== BUTTONS ===================== */
.portal-content .button,
.portal-content input[type="submit"].button-primary,
.portal-content .button-primary {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  border: none;
}

.portal-content .button {
  background: #f0f0f1;
  color: #1d2327;
  border: 1px solid #c3c4c7;
}

.portal-content .button:hover {
  background: #e0e0e0;
}

.portal-content .button-primary,
.portal-content input[type="submit"].button-primary {
  background: #2271b1;
  color: #fff;
  border: 1px solid #2271b1;
}

.portal-content .button-primary:hover,
.portal-content input[type="submit"].button-primary:hover {
  background: #135e96;
}

.portal-content .button-secondary {
  background: #f0f0f1;
  color: #1d2327;
  border: 1px solid #c3c4c7;
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}

.portal-content .button-secondary:hover {
  background: #e0e0e0;
}

/* ===================== FORMS ===================== */
.portal-content select {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  background: #fff;
  color: #1d2327;
}

.portal-content input[type="date"],
.portal-content input[type="number"],
.portal-content input[type="password"],
.portal-content input[type="text"],
.portal-content input[type="file"] {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  background: #fff;
}

.portal-content input[type="submit"] {
  padding: 6px 16px;
  font-size: 13px;
  border: 1px solid #2271b1;
  border-radius: 4px;
  background: #2271b1;
  color: #fff;
  cursor: pointer;
}

.portal-content input[type="submit"]:hover {
  background: #135e96;
}

.portal-content .form-table {
  border-collapse: collapse;
  margin-bottom: 16px;
}

.portal-content .form-table th {
  text-align: left;
  padding: 10px 12px 10px 0;
  font-weight: 600;
}

.portal-content .form-table td {
  padding: 8px 0;
}

/* ===================== NOTICES ===================== */
.portal-content .notice {
  padding: 12px 16px;
  border-radius: 4px;
  margin: 12px 0;
  font-size: 14px;
}

.portal-content .notice-success {
  background: #edfaef;
  border-left: 4px solid #00a32a;
  color: #1d2327;
}

.portal-content .notice-error {
  background: #fcf0f1;
  border-left: 4px solid #d63638;
  color: #1d2327;
}

/* ===================== TABS (Upload Page) ===================== */
.portal-content .nav-tab-wrapper {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #c3c4c7;
  margin-bottom: 20px;
}

.portal-content .nav-tab {
  padding: 10px 20px;
  font-size: 14px;
  color: #50575e;
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  margin-bottom: -1px;
  cursor: pointer;
}

.portal-content .nav-tab:hover {
  color: #1d2327;
  background: #f6f7f7;
}

.portal-content .nav-tab-active {
  background: #fff;
  color: #1d2327;
  border-color: #c3c4c7;
  font-weight: 600;
}

/* ===================== PRODUCT EDIT FORM ===================== */
.cc-edit-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.cc-edit-section:last-of-type {
  border-bottom: none;
}

.cc-edit-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: #1d2327;
  margin: 0 0 14px 0;
}

.cc-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cc-field-full {
  grid-column: 1 / -1;
}

.cc-field-checks {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding-top: 20px;
}

.cc-field-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.cc-field label {
  font-size: 13px;
  font-weight: 600;
  color: #50575e;
}

.cc-field input[type="text"],
.cc-field input[type="number"],
.cc-field input[type="date"] {
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  background: #fff;
  color: #1d2327;
  width: 100%;
}

.cc-field input:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

.cc-input-prefix {
  display: flex;
  align-items: center;
}

.cc-input-prefix span {
  padding: 8px 10px;
  font-size: 14px;
  background: #f0f0f1;
  border: 1px solid #c3c4c7;
  border-right: none;
  border-radius: 4px 0 0 4px;
  color: #50575e;
}

.cc-input-prefix input {
  border-radius: 0 4px 4px 0 !important;
}

.cc-edit-actions {
  display: flex;
  gap: 10px;
  padding-top: 20px;
}

.cc-edit-actions .button-primary {
  padding: 10px 24px;
  font-size: 14px;
}

.cc-edit-actions .button {
  padding: 10px 24px;
  font-size: 14px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .portal-nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 8px;
  }

  .portal-nav-links {
    flex-wrap: wrap;
    order: 3;
    width: 100%;
  }

  .portal-nav-right {
    order: 2;
  }

  .portal-content .widefat {
    font-size: 12px;
    display: block;
    overflow-x: auto;
  }

  .portal-content .widefat th,
  .portal-content .widefat td {
    padding: 8px;
  }
}
