/* Custom Admin Styling over benbeard.css */
body {
    overflow-y: scroll;
}

.hero-dashboard {
    min-height: auto;
    padding: 3rem 0;
}

.auth-container {
    max-width: 420px;
    margin: 4rem auto;
    padding: 2.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    border: 1px solid var(--border);
    text-align: center;
}

.auth-container h2 {
    font-family: var(--font-display);
    color: var(--text);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.auth-container p {
    color: var(--text-soft);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.input-control {
    width: 100%;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    font: inherit;
    transition: all 0.2s ease;
}

.input-control:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px var(--ring);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0 1.5rem;
    border-radius: 999px;
    background: var(--primary-gold);
    color: #151515;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    width: 100%;
    font-size: 1.05rem;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--surface-strong);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--surface);
}

.btn-danger {
    background: transparent;
    color: #e53e3e;
    border: 1px solid #e53e3e;
}
.btn-danger:hover {
    background: #e53e3e;
    color: white;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.link-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.link-slug {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    word-break: break-all;
    font-family: var(--font-display);
}

.link-target {
    color: var(--text-soft);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    word-break: break-all;
    flex-grow: 1;
}

.link-actions {
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.link-actions .btn {
    min-height: 2.25rem;
    padding: 0 1.2rem;
    font-size: 0.9rem;
    width: auto;
}

/* Modal styles for adding/editing */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-strong);
    border: 1px solid var(--border);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.open .modal {
    transform: scale(1);
}

.modal h3 {
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    color: var(--text);
    font-family: var(--font-display);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-actions .btn {
    flex: 1;
}

.hidden {
    display: none !important;
}

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-soft);
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--primary-gold-soft);
    margin-bottom: 1.25rem;
    display: block;
}

/* Toast notifications */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--surface);
    color: var(--text);
    padding: 1.15rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-strong);
    border-left: 4px solid var(--primary-gold);
    font-weight: 500;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, slideOut 0.3s ease 4s forwards;
    transform: translateX(120%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast i {
    color: var(--primary-gold);
}

.toast.error {
    border-left-color: #e53e3e;
}
.toast.error i {
    color: #e53e3e;
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

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

@media (max-width: 640px) {
    .auth-container, .modal {
        margin: 2rem 1rem;
        padding: 1.8rem;
        width: auto;
    }
    
    #toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}
