/* Certificate App Custom Styles */

/* Global */
:root {
  --primary-color: #1a237e;
  --success-color: #1b5e20;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f8f9fa;
}

main {
  flex: 1;
}

/* Typography */
.letter-spacing-2 {
  letter-spacing: 2px;
}

/* Card enhancements */
.card {
  border-radius: 12px;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card .card-header:first-child {
  border-radius: 12px 12px 0 0;
}

/* Table styles */
.table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

/* Form controls */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.15);
}

.form-control-lg {
  border-radius: 10px;
}

/* Button styles */
.btn {
  border-radius: 8px;
  font-weight: 500;
}

.btn-lg {
  border-radius: 12px;
}

/* Navbar */
.navbar {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-size: 1.4rem;
}

/* Alerts */
.alert {
  border-radius: 10px;
  border: none;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.4em 0.8em;
  border-radius: 6px;
}

/* Code blocks */
code {
  background: #f0f0f0;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Dashboard stat cards */
.card.bg-primary, .card.bg-success, .card.bg-danger {
  border-radius: 16px;
}

.card.bg-primary h1, .card.bg-success h1, .card.bg-danger h1 {
  font-weight: 800;
}

/* Table actions */
.btn-group .btn {
  padding: 0.25rem 0.5rem;
}

/* Footer */
footer {
  margin-top: auto;
}

/* Print styles */
@media print {
  .navbar, footer, .no-print {
    display: none !important;
  }
  main {
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .display-4 {
    font-size: 2rem;
  }
  .display-6 {
    font-size: 1.5rem;
  }
}
@media (max-width: 576px) {
  .display-4 {
    font-size: 1.5rem;
  }
  .display-6 {
    font-size: 1.25rem;
  }
}

/* Responsive brand name */
@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1rem;
    white-space: normal;
    line-height: 1.3;
    max-width: 85%;
  }
  .navbar-brand i {
    font-size: 1.1rem;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .navbar-brand {
    font-size: 1.15rem;
    white-space: normal;
    line-height: 1.3;
  }
}

/* Responsive card padding */
@media (max-width: 576px) {
  .card-body.p-5 {
    padding: 1.5rem !important;
  }
}

/* Responsive columns - stack signature & ID on mobile */
@media (max-width: 576px) {
  .verify-details .col-6 {
    width: 100% !important;
    text-align: center !important;
  }
  .verify-details .col-6:first-child {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
  }
}

/* Responsive action buttons - stack on mobile */
@media (max-width: 576px) {
  .verify-actions .btn {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Dashboard table - action buttons responsive */
@media (max-width: 768px) {
  .table .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .table .btn-group .btn {
    flex: 1 1 auto;
    min-width: 36px;
    padding: 0.3rem 0.4rem;
    font-size: 0.75rem;
  }
  .table .btn-group form {
    flex: 1;
    min-width: 36px;
  }
  .table .btn-group form .btn {
    width: 100%;
  }
}

/* Dashboard header responsive */
@media (max-width: 576px) {
  .dashboard-header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.75rem;
  }
  .dashboard-header h2 {
    text-align: center;
  }
  .dashboard-header .btn {
    width: 100%;
  }
}

/* Issue page - certificate details table responsive */
@media (max-width: 576px) {
  .issue-details-table th {
    width: auto !important;
    padding-bottom: 0.25rem;
  }
  .issue-details-table td,
  .issue-details-table th {
    display: block;
    width: 100%;
  }
  .issue-details-table tr {
    display: block;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
  }
  .issue-details-table tr:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

/* Issue page - action buttons responsive */
@media (max-width: 576px) {
  .issue-actions {
    flex-direction: column;
  }
  .issue-actions .btn {
    width: 100%;
  }
}

/* Issue page - success info column border */
@media (max-width: 767.98px) {
  .issue-success-info {
    border-left: none !important;
    border-top: 1px solid #dee2e6;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}
.nav-logout-btn {
  border-color: rgba(255, 255, 255, 0.65);
}
.nav-logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

