/* ============================================
   POS System - Dark Theme Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary-color: #00d4ff;
    --primary-dark: #0099cc;
    --secondary-color: #7c8da1;
    --success-color: #00d084;
    --danger-color: #ff6b6b;
    --warning-color: #ffa500;
    
    /* Dark theme colors */
    --bg-primary: #0a0e14;
    --bg-secondary: #0f1419;
    --bg-tertiary: #1a2332;
    --text-primary: #e0e6ed;
    --text-secondary: #a8b3c1;
    --card-bg: #0f1419;
    --input-bg: #0a0e14;
    --input-border: #1a2f4f;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    letter-spacing: 0.2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 0.9rem 0;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.navbar-brand {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    letter-spacing: 0.3px;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.navbar-menu a:hover {
    color: var(--primary-color);
    background-color: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.page-content {
    background-color: var(--bg-secondary);
    padding: 2.2rem;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2.4rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.dashboard h2 {
    color: var(--text-primary);
    margin: 2rem 0 1.2rem 0;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    font-weight: 500;
    font-size: 1.3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--card-bg) 100%);
    padding: 2rem 1.8rem;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
    text-align: center;
    border: 2px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
}

.stat-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.25);
    border-color: #00ffff;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.dashboard-section {
    background: var(--card-bg);
    padding: 2.2rem;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
    border: 1px solid var(--input-border);
    margin-bottom: 1.8rem;
}

.dashboard-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    font-weight: 500;
    font-size: 1.2rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 2px solid var(--primary-color);
}

.table th {
    padding: 15px 14px;
    text-align: left;
    font-weight: 500;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table td {
    padding: 15px 14px;
    border-bottom: 1px solid var(--input-border);
    color: var(--text-primary);
    font-size: 14px;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.3s ease;
    cursor: pointer;
    height: 50px;
}

.table tbody tr:hover {
    background-color: rgba(0, 212, 255, 0.06);
}

.table td:last-child {
    white-space: nowrap;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.4px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background-color: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-height: 46px;
    font-weight: 500;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
    background-color: var(--bg-tertiary);
}

.form-group textarea {
    resize: vertical;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 14px 26px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: rgba(0, 212, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.btn-success {
    background: var(--success-color);
    color: var(--bg-primary);
}

.btn-success:hover {
    opacity: 0.9;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
}

.btn-small {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 38px;
    background: var(--primary-color);
    color: var(--bg-primary);
    margin: 0 4px;
    font-weight: 500;
}

.btn-small:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 212, 255, 0.3);
}

/* Action buttons in tables */
.table .btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
    font-weight: 500;
    font-size: 14px;
}

.alert-error {
    background: rgba(255, 107, 107, 0.1);
    color: #ff9999;
    border-color: #ff6b6b;
}

.alert-success {
    background: rgba(0, 208, 132, 0.1);
    color: #66f0d0;
    border-color: #00d084;
}

/* Table Container */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 10px;
    background: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 2px solid var(--primary-color);
    padding: 15px 14px;
    text-align: left;
    font-weight: 500;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table-container td {
    border-bottom: 1px solid var(--input-border);
    padding: 15px 14px;
    color: var(--text-primary);
    font-size: 14px;
}

.table-container tr {
    height: 50px;
    cursor: pointer;
}

.table-container tr:hover {
    background: rgba(0, 212, 255, 0.06);
}

/* Search Box */
.search-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.search-box input {
    padding: 14px 15px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 15px;
    min-height: 44px;
    font-weight: 500;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

/* Info Section */
.info-section {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 24px;
}

.info-section h2 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 1.1rem;
}

.info-section p {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.info-section strong {
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a,
.pagination strong {
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--input-border);
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination a:hover {
    background-color: rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination strong {
    background-color: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 2px solid var(--primary-color);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}
