/* ==========================================================================
   My Cotton - Modern Admin Dashboard Styles
   ========================================================================== */

:root {
    --admin-primary: #8B1E3F;
    --admin-primary-hover: #731834;
    --admin-dark: #16202e;
    --admin-dark-hover: #0f1724;
    --admin-bg: #f4f6f9;
    --admin-card-bg: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text-main: #1e293b;
    --admin-text-muted: #64748b;
    --admin-success: #10b981;
    --admin-warning: #f59e0b;
    --admin-danger: #ef4444;
}

body.admin-body {
    background-color: var(--admin-bg);
    color: var(--admin-text-main);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Header */
.admin-header {
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-header .brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--admin-text-main);
}

.admin-header .site-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.admin-header .company-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--admin-primary);
    text-transform: uppercase;
    background: rgba(139, 30, 63, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
}

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

.admin-header .btn-website {
    background: #f1f5f9;
    color: #334155;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
    border: 1px solid #cbd5e1;
}

.admin-header .btn-website:hover {
    background: #e2e8f0;
}

.admin-header #logout {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.admin-header #logout:hover {
    background: #fca5a5;
}

/* Admin Container */
.admin-wrap {
    max-width: 1200px;
    margin: 30px auto 60px;
    padding: 0 20px;
}

/* Notice Toast */
.notice {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.notice:not(:empty) {
    display: block;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Login Card */
.login-card {
    max-width: 420px;
    margin: 80px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border: 1px solid var(--admin-border);
    text-align: center;
}

.login-card .eyebrow {
    font-size: 12px;
    font-weight: 700;
    color: var(--admin-primary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.login-card h2 {
    font-size: 26px;
    margin: 0 0 8px;
    color: var(--admin-dark);
}

.login-card p {
    color: var(--admin-text-muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.login-card form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.login-card label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-card input {
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.login-card input:focus {
    border-color: var(--admin-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.15);
}

.login-card button {
    background: var(--admin-primary);
    color: white;
    border: none;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 10px;
}

.login-card button:hover {
    background: var(--admin-primary-hover);
}

/* Dashboard Header & Stats */
.dashboard-title-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-title-area h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--admin-dark);
    margin: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.06);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(139, 30, 63, 0.08);
    color: var(--admin-primary);
}

.stat-card.highlight .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--admin-success);
}

.stat-card.inquiries .stat-icon {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

.stat-info h3 {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    color: var(--admin-dark);
    line-height: 1.1;
}

.stat-info p {
    font-size: 13px;
    color: var(--admin-text-muted);
    margin: 4px 0 0;
    font-weight: 500;
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 8px;
    background: #ffffff;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    margin-bottom: 25px;
    overflow-x: auto;
}

.admin-tabs button {
    background: transparent;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tabs button:hover {
    background: #f1f5f9;
    color: var(--admin-dark);
}

.admin-tabs button.active {
    background: var(--admin-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(139, 30, 63, 0.3);
}

/* Admin Panel Content */
.admin-panel {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.panel-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--admin-dark);
}

.panel-subtitle {
    font-size: 13px;
    color: var(--admin-text-muted);
    margin: 5px 0 0;
}

.btn-primary {
    background: var(--admin-primary);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    box-shadow: 0 2px 6px rgba(139, 30, 63, 0.25);
}

.btn-primary:hover {
    background: var(--admin-primary-hover);
    transform: translateY(-1px);
}

/* Product Cards Grid */
.products-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.product-admin-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-admin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.07);
}

.product-admin-thumb {
    position: relative;
    width: 100%;
    height: 160px;
    background: #f1f5f9;
}

.product-admin-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(22, 32, 46, 0.85);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.product-admin-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-admin-body h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--admin-dark);
}

.product-admin-desc {
    font-size: 12px;
    color: var(--admin-text-muted);
    line-height: 1.5;
    margin: 0 0 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-admin-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.btn-action {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-action.edit {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.btn-action.edit:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-action.delete {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn-action.delete:hover {
    background: #fca5a5;
    color: #991b1b;
}

/* Inquiries List */
.inquiry-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.inquiry-card:hover {
    border-color: #cbd5e1;
}

.inquiry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.inquiry-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inquiry-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--admin-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.inquiry-meta h4 {
    margin: 0;
    font-size: 15px;
    color: var(--admin-dark);
}

.inquiry-meta p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--admin-text-muted);
}

.inquiry-meta a {
    color: var(--admin-primary);
    text-decoration: none;
}

.inquiry-meta a:hover {
    text-decoration: underline;
}

.inquiry-body {
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    margin-bottom: 14px;
    border-left: 3px solid var(--admin-primary);
}

.inquiry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--admin-text-muted);
}

.inquiry-status-select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    background: white;
    cursor: pointer;
}

/* Forms in Settings & Password */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 750px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.admin-form input, .admin-form textarea, .admin-form select {
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    transition: border-color 0.2s;
}

.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus {
    border-color: var(--admin-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.12);
}

.admin-form button {
    align-self: flex-start;
    margin-top: 10px;
}

/* Content Rows for Pages, Blogs, Clients */
.content-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.content-row {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: border-color 0.2s;
}

.content-row:hover {
    border-color: #cbd5e1;
}

.content-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--admin-dark);
}

.content-info p {
    margin: 0;
    font-size: 12px;
    color: var(--admin-text-muted);
}

.content-actions {
    display: flex;
    gap: 8px;
}

/* Modals / Dialogs */
dialog {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 30px;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    max-width: 550px;
    width: 90%;
    position: relative;
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

dialog .close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
    transition: 0.2s;
}

dialog .close:hover {
    color: #0f172a;
}

dialog h2 {
    font-size: 20px;
    margin: 0 0 20px;
    color: var(--admin-dark);
}

dialog form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

dialog label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

dialog input, dialog textarea, dialog select {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

dialog input:focus, dialog textarea:focus, dialog select:focus {
    border-color: var(--admin-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.12);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        padding: 12px 16px;
    }
    .admin-wrap {
        padding: 0 12px;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .content-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
