/* ==========================================================================
   Conch Admin — Shared Styles
   Extracted common patterns used across all admin pages.
   Include via: <link href="/styles/shared.css" rel="stylesheet">
   ========================================================================== */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: #0f172a;
}

/* ============================
   Top Navigation
   ============================ */
.top-nav {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.nav-brand i {
    color: #6366f1;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.nav-link.active {
    background: #eef2ff;
    color: #6366f1;
}

.nav-link i {
    width: 18px;
    height: 18px;
}

/* ============================
   Main Content
   ============================ */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.page-header p {
    color: #64748b;
    font-size: 15px;
}

/* ============================
   Content Cards
   ============================ */
.content-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.card-description {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.card-body {
    padding: 1.5rem;
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn i {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #4f46e5;
}

.btn-secondary {
    background: #f1f5f9;
    color: #0f172a;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
}

/* ============================
   Forms
   ============================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ============================
   Search
   ============================ */
.search-bar {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 18px;
    height: 18px;
}

/* ============================
   Tables
   ============================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tr:hover {
    background: #f8fafc;
}

/* ============================
   Badges
   ============================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #0c4a6e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================
   Pagination
   ============================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.pagination .btn {
    min-width: 100px;
    justify-content: center;
}

.pagination span {
    font-size: 14px;
    color: #64748b;
}

/* ============================
   Danger Zone
   ============================ */
.danger-zone {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
}

.danger-zone h3 {
    font-size: 16px;
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 8px;
}

.danger-zone p {
    font-size: 13px;
    color: #7f1d1d;
    margin-bottom: 12px;
}

/* ============================
   Loading States
   ============================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #94a3b8;
    gap: 8px;
}

.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #6366f1;
    border-radius: 2px;
    transition: width 0.3s;
}

/* ============================
   Toast Notifications
   ============================ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    min-width: 320px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left-color: #22c55e; }
.toast.error { border-left-color: #ef4444; }
.toast.info { border-left-color: #3b82f6; }

.toast-icon { flex-shrink: 0; }
.toast-icon.success { color: #22c55e; }
.toast-icon.error { color: #ef4444; }
.toast-icon.info { color: #3b82f6; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; font-size: 14px; color: #0f172a; margin-bottom: 2px; }
.toast-message { font-size: 13px; color: #64748b; }
.toast-close { cursor: pointer; color: #94a3b8; }
.toast-close:hover { color: #64748b; }

/* ============================
   Utility
   ============================ */
.hidden {
    display: none !important;
}

.text-muted {
    color: #94a3b8;
}

.text-danger {
    color: #ef4444;
}

/* ============================
   Mobile Menu
   ============================ */
.mobile-menu-btn {
    display: none;
}

.nav-overlay {
    display: none;
}

.mobile-nav {
    display: none;
}
