/* ==========================================================================
   ADMIN PANEL STYLES - Styrke i hver maske
   ========================================================================== */

/* LOGIN SCREEN */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.admin-login-container {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.admin-logo {
    width: 120px;
    height: auto;
    margin: 0 auto 2rem;
}

.admin-login h1 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #333;
}

.error-message {
    color: #e74c3c;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ADMIN HEADER */
.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: white;
}

/* ADMIN MAIN */
.admin-main {
    background: #f5f5f5;
    min-height: calc(100vh - 80px);
    padding: 3rem 2rem;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ADMIN TABS */
.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.admin-tab {
    background: none;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.admin-tab:hover {
    color: #667eea;
}

.admin-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-section {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    color: #333;
    font-size: 1.6rem;
}

/* FORM STYLES */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #888;
    font-size: 0.85rem;
}

/* IMAGE UPLOAD */
.image-upload-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-upload-input {
    display: none;
}

.btn-upload {
    background: #3498db;
    white-space: nowrap;
}

.btn-upload:hover {
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.image-file-name {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.image-preview {
    margin-top: 1rem;
    max-width: 400px;
}

.image-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

/* BUTTONS */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-edit {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #c0392b;
}

/* POSTS LIST */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s;
}

.post-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.post-item-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #333;
}

.post-date {
    color: #888;
    font-size: 0.9rem;
}

.post-item-actions {
    display: flex;
    gap: 0.75rem;
}

.no-posts {
    text-align: center;
    color: #888;
    padding: 2rem;
    font-style: italic;
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    max-width: 400px;
    pointer-events: all;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #dda935;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(400px);
    opacity: 0;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.toast-message {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Toast types */
.toast.toast-success {
    border-left-color: #27ae60;
}

.toast.toast-success .toast-icon {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

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

.toast.toast-error .toast-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.toast.toast-warning {
    border-left-color: #f39c12;
}

.toast.toast-warning .toast-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.toast.toast-info {
    border-left-color: #3498db;
}

.toast.toast-info .toast-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

/* CONFIRMATION MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: calc(100% - 2rem);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
}

.modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.75rem 0;
}

.modal-body {
    padding: 0 2rem 2rem;
    text-align: center;
}

.modal-message {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.85rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.modal-btn-cancel {
    background: #e0e0e0;
    color: #555;
}

.modal-btn-cancel:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.modal-btn-confirm:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .admin-section {
        padding: 1.5rem;
    }

    .post-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .post-item-actions {
        width: 100%;
    }

    .post-item-actions button {
        flex: 1;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }

    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}
