/* card */

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: 100%;
}

#loginForm {
    animation: fadeSlideIn 0.35s ease;
}

/* form title */
.form-title {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 5px;
}

.form-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.form-subtitle a {
    color: var(--primary-color);
    font-weight: 500;
}

/* form elements */
.form-group {
    margin-bottom: 5px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 5px;
    margin-bottom: 3px;
    color: var(--dark);
}

.input-field {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--sidebar-text);
    background: #f9fafb;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.input-field:focus {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}

/* password wrapper */

.input-wrapper {
    position: relative;
}

.input-wrapper .input-field {
    padding-right: 40px;
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    background: transparent;
}

.input-icon img {
    width: 20px;
    height: 20px;
}

/* Button */

.btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background .2s ease, transform .2s ease;
    position: relative;
    overflow: hidden;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 3px solid transparent;
    border-top-color:#fff;
    border-right-color: #fff;
    border-radius: 50%;
    animation:buttonSpin .6s linear infinite;
}

.btn.loading {
    pointer-events: none;
    opacity: .95;
}

.btn.loading .btn-label {
    display: none;
}

.btn.loading .btn-spinner {
    display: inline-block;
}

.btn.success{
    background: var(--success);
}

.btn:disabled{
    cursor: not-allowed;
    opacity: .75;
}

@keyframes buttonSpin{
    from{
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.btn-gap {
    margin-top: 10px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    opacity: 0.9;
}


/* Google Btn */
.btn-google {
    background: var(--light);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--dark);
    transition: all 0.2s ease;
}

.google-logo {
    width: 18px;
}

.btn-google:hover {
    background-color: var(--white);
}

.btn-google.loading .google-logo {
    display: none;
}

.btn-google.loading .btn-label {
    display: none;
}

.btn-google.loading .btn-spinner {
    display: inline-block;
}

/* Divider line */

.divider {
    display: flex;
    align-items: center;
    margin: 15px 0;
    color: var(--gray);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    margin: 0 10px;
}

/* login page options */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.form-options button {
    color: var(--primary-color);
    font-weight:600;
    cursor: pointer;
    border: none;
    background: transparent;
}

.forgot-password-card {
    width: 100%;
    animation: fadeSlideIn 0.35s ease;
}

.forgot-icon {
    text-align: center;
    margin-bottom: 28px;
}

.forgot-header {
    text-align: center;
    margin-bottom: 28px;
}

.highlight-email {
    color: var(--primary-color);
    font-weight: 600;
}

.forgot-icon {
    width: 45px;
    height: 45px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
    background: rgba(108, 99, blue, 255, 0.12);
    color: var(--primary-color);
    border: 1px solid rgba(108, 99, 255, 0.12);
}

.forgot-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}


.forgot-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
    max-width: 320px;
    margin: 0 auto;
}

.back-btn {
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}

.back-btn:hover {
    color: var(--primary-color);
}

.reset-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
    text-align: center;
    animation: fadeSlideIn 0.35s ease;
}

.success-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #e6f7ed;
    border: 1px solid #b7ebca;
    padding: 10px 16px;
    border-radius: 50px;
    width: fit-content;
}

.success-icon-small {
    color: #28a745;
    font-size: 1.2rem;
    font-weight: bold;
}

.success-text {
    color: #1e7e34;
    font-size: 0.95rem;
    font-weight: 500;
}

.success-icon {
    width: 45px;
    height: 45px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    font-size: 2rem;
    font-weight: bold;
}

.success-icon-small::before {
    content: '✓';
    display: inline-block;
    margin-right: 5px;
}

.cooldown-container {
    text-align: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    width: 100%;
}

.cooldown-container {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #888;
}

#timerText {
    font-weight: 600;
    color: #333;
}

#seconds {
    color: #4a90e2;
}

.btn-resend {
    background: none;
    border: 2px solid #4a90e2;
    color: #4a90e2;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-resend:hover {
    background: #4a90e2;
    color: white;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.checkbox-group {
    display: flex;
    align-items: center;
    gap: 6px;
}


.error {
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
}

.error-center {
    display: none;
    padding: 10px;
    margin: 10px 2px;
    text-align: center;
    color: white;
    border-radius: 4px;
    background-color: var(--danger);
}

.input-field.input-error{
    border: 1px solid var(--danger) !important;
    box-shadow: none !important;
}

.input-field.input-error:focus {
    border: 1px solid var(--danger) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.toast-container {
    position: fixed;
    top: 40px;
    right: 48px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    width: 340px;
    max-width: calc(100vw - 32px);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--light);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    box-shadow: 0 18px 28px rgba(0, 0, 0, .10);
    transition: transform .2s ease;
    transform: translateX(120%);
    opacity:0;
    animation: toastIn .4s cubic-bezier(.2, .8, .2, 1) forwards;
    position: relative;
    overflow: hidden;
}

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

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, .12);
    color: var(--danger);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-icon {
    width: 32px;
    height:32px;
    border-radius: 50%;
    display:flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight:700;
    flex-shrink: 0;
}

.toast-body {
    flex:1;
}

.toast-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--dark);
}

.toast-message {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: 400;
    opacity: .45;
    padding: 4px;
    line-height: 1;
    margin-top: -2px;
}

.toast-close:hover {
    opacity:.8;
}

/* timer bar */

.toast::after{
    content:"";
    position:absolute;
    left:18px;
    bottom:0;
    right:18px;
    height:3px;
    width:auto;
    border-radius: 999px;
    border-bottom-left-radius:14px;
    background:var(--danger);
    transform-origin:left;
    animation:
    toastTimer 5s linear forwards;
}

.toast-success::after {
    background: var(--success);
}

@keyframes toastIn{
    to{
        transform:translateX(0);
        opacity:1;
    }
}


@keyframes toastOut{
    to{
        transform:translateX(120%);
        opacity:0;
    }
}


@keyframes toastTimer{
    from{
        transform:scaleX(1);
    }
    to{
        transform:scaleX(0);
    }
}

.card.shake{
    animation: shake .3s ease;
}

@keyframes shake{
    0%{
        transform:translateX(0);
    }
    25%{
        transform:translateX(-4px);
    }
    50%{
        transform:translateX(4px);
    }
    75%{
        transform:translateX(-4px);
    }
    100%{
        transform:translateX(0);
    }
}

/* Home page */
.google-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f5;
    animation: slideInBanner 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}

.hidden{
    display: none;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f8f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.banner-icon img {
    width: 24px;
}

.banner-text {
    display: flex;
    flex-direction: column;
}

.banner-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1a1a1a;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

.banner-subtitle {
    font-size: 0.875rem;
    color: #666670;
    line-height: 1.4;
}

.badge {
    font-size: 11px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(var(--primary-color), 0.1);
    color: var(--primary-color);
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-outline {
    padding: 12px;
    background: transparent;
    border: none;
    color: #888;
    font-weight: 500;
    cursor: pointer;
}

.btn-outline:hover {
    color: #333;
    text-decoration: underline;
}

.google-banner:hover{
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

@keyframes slideInBanner {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media(max-width:480px){

    .toast-container{
        right:12px;
        left:12px;
        top:14px;
    }

    .toast{
        min-width:auto;
        width:100%;
    }

    .google-banner {
        border-radius: 12px;
    }

    .banner-content {
        flex-direction: row;
        align-items: center;
    }

    .badge {
        padding: 0px;
    }

    .banner-title {
        font-size: 0.75rem;
        flex-wrap: wrap;
        text-align: center;
    }

    .banner-subtitle {
        font-size: 0.6rem;
    }

    .banner-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .btn-primary, .btn-outline {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}

@media (max-width: 768px) {

    .google-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .banner-actions {
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid #f0f0f5;
        padding-top: 12px;
    }

    .banner-content {
        flex-direction: row;
        align-items: center;
    }

}

@media (max-width: 992px) {

  .toast-container{
      top: 40px;
      left: 50%;
      right: auto;
      transform: translateX(-50%);
  }

  .toast{
      width: 420px;
      max-width: calc(100vw - 48px);
  }

  .google-banner {
    padding: 14px 20px;
    gap: 12px;
  }

  .banner-icon {
    width: 40px;
    height: 40px;
  }

  .banner-content {
        align-items: center;
    }

}

