/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #000000;
    --background-color: #ffffff;
    --text-color: #333333;
    --accent-color: #444444;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -1px;
}

nav ul {
    display: flex;
    gap: 20px;
}

nav a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav a:hover {
    color: #666;
}

.auth-buttons .btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login {
    border: 1px solid var(--primary-color);
    margin-right: 10px;
}

.btn-login:hover {
    background-color: #f5f5f5;
}

.btn-register {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.btn-register:hover {
    background-color: #333;
    border-color: #333;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #222;
}

/* Features Section */
.features {
    padding: 80px 5%;
    background-color: #f9f9f9;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--primary-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-btn:hover {
    background-color: #222;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

.auth-footer a {
    font-weight: 600;
    text-decoration: underline;
}

/* Footer */
footer {
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.text-error {
    color: red;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    /* Header */
    header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .landing-nav {
        display: none;
    }

    nav ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        width: 100%;
    }

    .auth-buttons {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn-login,
    .btn-register {
        margin: 0 !important;
        flex: 1;
        text-align: center;
    }

    /* Hero */
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* Grids */
    .feature-grid,
    .app-grid,
    .admin-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    /* Responsive Tables (Card View) */
    /* Only apply where data-label is present or generic tables */
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-responsive tr {
        margin-bottom: 20px;
        border: 1px solid #eee;
        border-radius: 12px;
        padding: 15px;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    .table-responsive td {
        border: none;
        border-bottom: 1px solid #f9f9f9;
        position: relative;
        padding-left: 0;
        text-align: left;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .table-responsive td:last-child {
        border-bottom: none;
    }

    /* Modals */
    .modal-content {
        width: 90%;
        margin: 10px;
        padding: 20px;
    }

    /* Global Container Padding */
    .inventory-container,
    .support-container,
    .view-container {
        padding: 0 5%;
        margin-top: 20px;
    }

    .action-bar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        text-align: center;
    }
}

/* Floating Help Button */
.help-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
}

.help-button:hover {
    transform: scale(1.1);
    background-color: #333;
}

/* 
   --------------------------------------------------------
   GLOBAL VISUAL REFRESH (ROUNDED & SHADOWS) 
   --------------------------------------------------------
*/

/* Buttons & Interactive Elements */
button,
.btn,
.btn-login,
.btn-register,
.cta-button,
.auth-btn,
.btn-action,
.btn-update,
.btn-post,
input[type="submit"],
.action-link {
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    /* Bouncy effect */
}

button:hover,
.btn:hover,
.cta-button:hover,
.auth-btn:hover,
.btn-action:hover,
.btn-update:hover,
.btn-post:hover,
input[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1) !important;
}

button:active,
.btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea,
.onboarding-input {
    border-radius: 10px !important;
    border: 1px solid #e0e0e0;
    padding: 12px 15px !important;
    /* More breathing room */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01) !important;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus,
.onboarding-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05) !important;
    /* Focus ring */
    outline: none;
}

/* Cards & Containers */
.card,
.feature-card,
.app-card,
.stat-card,
.settings-card,
.auth-container,
.onboarding-card,
.modal-content,
.sidebar-right .card {
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04) !important;
    /* Soft, modern shadow */
    border: 1px solid rgba(0, 0, 0, 0.02) !important;
    overflow: hidden;
    /* Contains children border-radius */
}

/* Images & Avatars */
.post-avatar,
.profile-card img,
.app-icon-placeholder {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Sidebar & Navigation */
.sidebar-menu a,
.tab-btn {
    border-radius: 8px !important;
}

/* Specific Fixes */
.btn-login {
    border: 1px solid #eee !important;
    background: transparent;
}

/* Responsive Pricing Plans */
.plan-featured {
    transform: scale(1.05);
    z-index: 2;
    overflow: visible !important;
}

@media (max-width: 900px) {
    .plan-featured {
        transform: none !important;
        margin: 20px 0;
    }
}

/* Admin Panel Styles */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: #000;
    color: #fff;
    padding: 20px;
    flex-shrink: 0;
}

.admin-content {
    flex-grow: 1;
    padding: 40px;
    background: #fdfdfd;
}

.sidebar-menu {
    list-style: none;
    margin-top: 40px;
}

.sidebar-menu li {
    margin-bottom: 15px;
}

.sidebar-menu a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #222;
    color: #fff;
}

@media (max-width: 768px) {
    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        padding: 10px;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        margin-top: 10px;
        gap: 10px;
        padding-bottom: 10px;
    }

    .sidebar-menu a {
        white-space: nowrap;
    }

    .admin-content {
        padding: 20px;
    }
}