/* Peer Paw Premium Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #0066FF;
    --primary-yellow: #FFCC00;
    --primary-yellow-hover: #E6B800;
    --bg-slate: #F8FAFC;
    --text-dark: #0F172A;
    --text-slate: #475569;
    --card-bg: #FFFFFF;
    --card-frame: #E0F2FE; /* Sky 100 frame background */
    --font-heading: 'Outfit', 'Sarabun', sans-serif;
    --font-body: 'Sarabun', 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-slate);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-dark);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0052cc;
}

/* Custom layout wrapper */
.app-container {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.main-wrapper {
    display: flex;
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    gap: 2.5rem;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: #ffffff;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-title {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #F1F5F9;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-slate);
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background-color: #F1F5F9;
    color: var(--primary-blue);
}

.sidebar-link.active {
    background-color: #EFF6FF;
    color: var(--primary-blue);
    font-weight: 600;
    border-left: 4px solid var(--primary-blue);
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Header Navbar */
.custom-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid #E2E8F0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.logo-icon {
    background-color: var(--primary-blue);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-switch {
    display: flex;
    background-color: #F1F5F9;
    border-radius: 2rem;
    padding: 0.25rem;
    gap: 0.15rem;
}

.lang-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-slate);
    transition: all 0.2s ease;
}

.lang-btn.active {
    background-color: #ffffff;
    color: var(--text-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.admin-badge {
    background-color: #FEF3C7;
    color: #92400E;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-weight: 600;
}

/* Home Layout Hero Section (As designed in Figma) */
.home-hero {
    background-color: #ffffff;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.home-title {
    font-size: 1.85rem;
    line-height: 1.35;
    margin: 0;
    color: var(--text-dark);
}

.home-body-split {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    align-items: center;
}

.home-image-container {
    display: flex;
    justify-content: center;
    position: relative;
}

.phone-mockup {
    width: 100%;
    max-width: 280px;
    border-radius: 2.5rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    border: 12px solid #000;
    background-color: #000;
}

.home-text-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.home-subheading {
    font-size: 1.45rem;
    color: var(--primary-blue);
    margin: 0;
}

.home-description {
    color: var(--text-slate);
    font-size: 1.05rem;
    margin: 0;
    white-space: pre-line;
}

/* Grid Layout styling (3x3 or Home bottom items) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.home-bottom-grid {
    margin-top: 1rem;
}

.grid-card {
    background-color: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #F1F5F9;
}

.grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.step-indicator {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary-yellow);
    color: var(--text-dark);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.4);
    z-index: 10;
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 1rem;
    overflow: hidden;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.grid-card:hover .card-image {
    transform: scale(1.03);
}

/* Responsive frame for text below image */
.card-text-frame {
    background-color: #EFF6FF; /* Default light blue Sky-50 */
    border-radius: 1.25rem;
    padding: 1.25rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
    display: flex;
    align-items: center;
    border: 1px solid #DBEAFE;
}

/* Button & UI styling */
.btn-primary {
    background-color: var(--primary-blue);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: #0052cc;
    color: #ffffff;
}

.btn-secondary {
    background-color: #64748B;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-yellow {
    background-color: var(--primary-yellow);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-yellow:hover {
    background-color: var(--primary-yellow-hover);
}

.btn-danger {
    background-color: #EF4444;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-danger:hover {
    background-color: #DC2626;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-control {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #CBD5E1;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

/* Admin Dashboard layout */
.admin-card {
    background-color: #ffffff;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E2E8F0;
}

/* Card management list */
.admin-items-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.admin-item-card {
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 100px 1fr 80px;
    gap: 1.5rem;
    align-items: center;
    position: relative;
}

.admin-item-preview {
    width: 100px;
    height: 120px;
    border-radius: 0.5rem;
    background-color: #E2E8F0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-item-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.admin-item-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Footer layout */
.custom-footer {
    background-color: #0F172A;
    color: #94A3B8;
    padding: 2rem 1.5rem;
    border-top: 1px solid #1E293B;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .main-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home-body-split {
        grid-template-columns: 1fr;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-item-card {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .admin-item-preview {
        width: 120px;
        height: 150px;
    }
}