html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.topbar {
    height: 74px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
}

.brand {
    text-decoration: none;
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 8px 14px 8px 8px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

    .user-info strong {
        color: #0f172a;
        font-size: 14px;
    }

    .user-info small {
        color: #64748b;
        font-size: 12px;
    }

.nav-btn,
.logout-btn {
    border: none;
    background: #2563eb;
    color: white;
    text-decoration: none;
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
}

.logout-btn {
    background: #ef4444;
}

    .nav-btn:hover,
    .logout-btn:hover {
        opacity: 0.92;
    }

@media (max-width: 768px) {

    .topbar {
        padding: 0 14px;
    }

    .brand {
        font-size: 18px;
    }

    .user-info {
        display: none;
    }

    .nav-btn,
    .logout-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}
.primary-btn {
    background: #16a34a;
}
.resend-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.loading-box {
    background: white;
    width: 90%;
    max-width: 420px;
    padding: 34px;
    border-radius: 28px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,0.25);
}

.spinner {
    width: 54px;
    height: 54px;
    border: 5px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    margin: 0 auto 18px;
    animation: spin 0.8s linear infinite;
}

.loading-box h3 {
    margin: 0 0 8px;
    color: #0f172a;
}

.loading-box p {
    margin: 0;
    color: #64748b;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    right: -7px;
    bottom: -7px;
    background: white;
    border: 2px solid #2563eb;
    border-radius: 50%;
    cursor: nwse-resize;
}

.stamp-box .resize-handle {
    border-color: #16a34a;
}