/* ============================================
   LogifyMe - Modern SaaS Website Styles
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
    transition: var(--transition);
}

.logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo:hover {
    opacity: 0.8;
}

.navbar-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* hide mobile action container by default (desktop) */
.navbar-actions-mobile {
    display: none;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: var(--transition);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 90;
    opacity: 0;
    transition: opacity var(--transition);
}

body.nav-open .nav-overlay {
    display: block;
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.btn:hover::before {
    transform: translateX(0);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Admin Layout */
.admin-body {
    background: var(--gray-50);
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: white;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 18px rgba(0,0,0,0.12);
}

.admin-content {
    flex: 1;
    padding: 32px 40px 48px;
}

.admin-header h1 {
    margin: 4px 0 6px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    color: var(--gray-500);
    margin: 0;
}

.table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-800);
    text-align: left;
}

.admin-table th {
    background: var(--gray-50);
    font-weight: 700;
    color: var(--gray-700);
}

.admin-table tr:hover td {
    background: #f8fafc;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-600); }

.table-empty {
    padding: 32px;
    text-align: center;
    color: var(--gray-500);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.badge-success { background: #e8f8f0; color: #0f9d58; }
.badge-warning { background: #fff7e6; color: #d97706; }
.badge-info    { background: #e8f1ff; color: #2563eb; }
.badge-error   { background: #ffeaea; color: #c53030; }
.badge-neutral { background: #f1f5f9; color: #475569; }

.pagination {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-active {
    border-color: var(--primary);
    color: var(--primary);
}

.section-header {
    margin-bottom: 12px;
}

.form-grid section + section {
    margin-top: 28px;
}

.form-actions {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
}

.form-hint {
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 6px;
    line-height: 1.4;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
}

.modal-backdrop.show {
    display: flex;
}

.modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 20px 16px;
    width: 100%;
    max-width: 640px;
    box-shadow: var(--shadow-xl);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-outline-sm {
    padding: 6px 14px;
    font-size: 14px;
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
}

.btn-error {
    background: var(--error);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cart Icon */
.cart-icon {
    position: relative;
    padding: 8px;
    color: var(--gray-700);
    transition: var(--transition);
}

.cart-icon:hover {
    color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--error);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alerts */
.alert {
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.alert-floating {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: calc(100% - 48px);
}

.alert-success {
    background: var(--success);
    color: var(--white);
}

.alert-error {
    background: var(--error);
    color: var(--white);
}

.alert-warning {
    background: var(--warning);
    color: var(--white);
}

.alert-error {
    background: #ffeaea;
    color: #c53030;
    border: 1px solid #f5c2c7;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 72px - 300px);
}

/* Hero Section */
.hero {
    padding: 120px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M30 0l30 30-30 30L0 30z" fill="rgba(255,255,255,0.03)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: slideUp 0.8s ease-out;
}

.hero p {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 32px;
    animation: slideUp 0.8s ease-out 0.1s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: slideUp 0.8s ease-out 0.2s both;
}

/* Section */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-600);
}

/* Grid */
.grid {
    display: grid;
    gap: 32px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Card */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--white);
}

.card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.card p {
    color: var(--gray-600);
    line-height: 1.7;
}

/* Form */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.error {
    border-color: var(--error);
}

.form-error {
    color: var(--error);
    font-size: 14px;
    margin-top: 6px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url('data:image/svg+xml,<svg width="12" height="8" xmlns="http://www.w3.org/2000/svg"><path d="M1 1l5 5 5-5" stroke="%234b5563" stroke-width="2" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    font-size: 15px;
}

.footer-column a:hover {
    color: var(--white);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-sm {
    font-size: 14px;
}

.text-muted {
    color: var(--gray-500);
}

.mt-4 {
    margin-top: 32px;
}

.mb-4 {
    margin-bottom: 32px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-content {
        position: relative;
    }
    .navbar-menu {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 16px 20px 24px;
        flex-direction: column;
        gap: 14px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.12);
        z-index: 95;
    }
    .navbar-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }

    .navbar-actions {
        display: none;
    }
    .navbar-menu .navbar-actions-mobile {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 6px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}
