/* Site Manager - Styles matching Reptile Jigs theme */

:root {
    --primary: #4FCB6B;
    --primary-dark: #3BA856;
    --primary-darker: #2D8644;
    --primary-light: #7FDB8F;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --text: #12212f;
    --text-muted: #6b7a90;
    --border: #d9e4ea;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f8ec 0%, #d4f0db 50%, #c0e8ca 100%);
    color: var(--text);
    min-height: 100vh;
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.auth-header h1 {
    color: var(--primary-darker);
    margin-bottom: 10px;
    font-size: 2rem;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 203, 107, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 2px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 2px solid #cfc;
}

.auth-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
}

.tab-content {
    margin-top: 20px;
}

/* Main Layout */
.main-header {
    background: white;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    max-width: 120px;
}

.header-title h1 {
    color: var(--primary-darker);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--off-white);
    border-radius: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-darker);
    margin-bottom: 10px;
}

.card-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.action-btn {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer !important;
    transition: all 0.3s ease;
    text-decoration: none !important;
    color: var(--text) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    -webkit-user-select: none;
    user-select: none;
}

.action-btn:link,
.action-btn:visited,
.action-btn:hover,
.action-btn:active,
.action-btn:focus {
    text-decoration: none !important;
    color: var(--text) !important;
    outline: none;
}

.action-btn:hover {
    border-color: var(--primary);
    background: var(--off-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.action-icon {
    font-size: 2rem;
    pointer-events: none;
}

.action-text {
    font-weight: 600;
    pointer-events: none;
    font-size: 0.95rem;
}

/* Tables */
.data-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-header {
    padding: 20px;
    background: var(--off-white);
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-darker);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--off-white);
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: var(--off-white);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-darker);
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .data-table {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Mobile-specific fixes for media page */
    .main-container {
        padding: 10px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-container {
        padding: 15px !important;
    }
    
    /* Media gallery grid - single column on mobile */
    .media-gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Header flex fixes */
    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    
    .page-header .btn {
        width: 100%;
    }
    
    /* Form elements full width on mobile */
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Buttons full width on mobile */
    .btn {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Modal content adjustments */
    .modal-content {
        max-width: 95vw !important;
        width: 95vw !important;
        margin: 10px !important;
        padding: 15px !important;
    }
    
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Data table adjustments */
    .data-table {
        margin: 0;
        border-radius: 15px;
    }
    
    .data-table .table-header {
        padding: 15px !important;
    }
}

/* Pulse animation for unseen changes indicator */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .main-container {
        padding: 5px !important;
    }
    
    .data-table > div[style*="padding"] {
        padding: 10px !important;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    .table-title {
        font-size: 1rem !important;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-darker);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 25px;
    background: var(--off-white);
    border-radius: 15px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--off-white);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notification Styles */
#toast {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background: linear-gradient(135deg, #4FCB6B, #3BA856) !important;
    color: white !important;
    padding: 18px 28px !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(79, 203, 107, 0.2) !important;
    z-index: 9999999 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), 
                transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                visibility 0.4s !important;
    min-width: 250px !important;
    max-width: 350px !important;
    pointer-events: none !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    transform: translateX(400px) !important;
}

.toast-icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: checkmarkPulse 0.6s ease-out;
}

@keyframes checkmarkPulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

