/* ==========================================================================
   SHUBHAM CIVIL - ADMIN PORTAL STYLES
   ========================================================================== */

/* Layout & Containers */
.admin-body {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-wrapper {
  flex: 1;
  padding: 2rem 1rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* Header Navbar */
.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.admin-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-nav-brand span {
  color: var(--accent-gold);
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: rgba(229, 169, 59, 0.1);
  border: 1px solid rgba(229, 169, 59, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-gold-light);
}

/* Auth / Login Card */
.auth-container {
  max-width: 440px;
  margin: 3rem auto;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.admin-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-cyan));
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-label span.req {
  color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(229, 169, 59, 0.2);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* File Upload Zone */
.upload-dropzone {
  border: 2px dashed rgba(229, 169, 59, 0.4);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(17, 24, 39, 0.6);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent-gold);
  background: rgba(229, 169, 59, 0.05);
}

.upload-dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  color: var(--accent-gold);
}

.upload-dropzone p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.upload-dropzone small {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Image Preview */
.preview-box {
  display: none;
  margin-top: 1rem;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
  max-height: 260px;
  background: #000;
}

.preview-box img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.preview-remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.preview-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.08);
}

/* Progress Bar */
.upload-progress {
  display: none;
  margin-top: 1rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-cyan));
  transition: width 0.2s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* Setup Notice / Banner */
.setup-notice {
  background: rgba(229, 169, 59, 0.12);
  border: 1px solid rgba(229, 169, 59, 0.35);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.setup-notice-icon {
  color: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.setup-notice h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--accent-gold-light);
}

.setup-notice p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(229, 169, 59, 0.12);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-info h3 {
  font-size: 1.5rem;
  margin: 0;
  font-family: var(--font-heading);
}

.stat-info span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Uploaded Projects List / Grid */
.manage-section {
  margin-top: 3rem;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title-row h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin: 0;
}

.admin-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.admin-project-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.admin-project-thumb {
  height: 180px;
  width: 100%;
  object-fit: cover;
  background: #000;
}

.admin-project-details {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.admin-project-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(229, 169, 59, 0.15);
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.admin-project-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.admin-project-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.admin-delete-btn {
  margin-top: auto;
  padding: 0.5rem 0.85rem;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.admin-delete-btn:hover {
  background: #ef4444;
  color: #fff;
}

/* Toast Notifications */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  z-index: 99999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.admin-toast.toast-success {
  border-color: #22c55e;
}

.admin-toast.toast-error {
  border-color: #ef4444;
}
