/* Modern UI Styles - Reusable for all pages */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e1e8ed;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e1e8ed;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #4e0fd9;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu .menu-section {
    padding: 8px 32px;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 24px;
}

.sidebar-menu .menu-section:first-child {
    margin-top: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 32px;
    color: #5a6c7d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: #f8f5ff;
    color: #4e0fd9;
    border-left-color: #4e0fd9;
}

.sidebar-menu .active a,
.sidebar-menu a.active {
    background: linear-gradient(90deg, rgba(78, 15, 217, 0.1) 0%, rgba(254, 152, 5, 0.05) 100%);
    color: #4e0fd9;
    border-left-color: #fe9805;
}

.sidebar-menu .submenu ul {
    list-style: none;
    background: #f8fafc;
    border-top: 1px solid #e1e8ed;
    border-bottom: 1px solid #e1e8ed;
}

.sidebar-menu .submenu ul a {
    padding: 8px 32px 8px 60px;
    font-size: 13px;
    border-left: none;
}

.sidebar-menu .submenu.active ul {
    display: block;
}

.sidebar-menu .submenu:not(.active) ul {
    display: none;
}

.sidebar-menu .submenu > a i.fa-chevron-down {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.2s;
}

.sidebar-menu .submenu.active > a i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Main Content */
.main-container {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
}

.header {
    background: white;
    padding: 16px 32px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #5a6c7d;
    font-size: 14px;
}

.user-info i {
    font-size: 24px;
    color: #4e0fd9;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #4e0fd9 0%, #6b2ee3 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(78, 15, 217, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3d0bae 0%, #5520c7 100%);
    box-shadow: 0 6px 16px rgba(78, 15, 217, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #5a6c7d;
    border: 1px solid #dfe3e8;
}

.btn-secondary:hover {
    background: #f5f7fa;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}

/* Form Styles */
.form-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
    overflow: hidden;
    margin-bottom: 24px;
}

.form-card-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e1e8ed;
}

.form-card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.form-card-body {
    padding: 32px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4e0fd9;
    box-shadow: 0 0 0 3px rgba(78, 15, 217, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group-full {
    grid-column: 1 / -1;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Table Styles */
.content-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
    overflow: hidden;
}

.section-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.table-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input,
.filter-select,
.filter-date {
    padding: 8px 12px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.search-input {
    min-width: 200px;
}

.search-input:focus,
.filter-select:focus,
.filter-date:focus {
    outline: none;
    border-color: #4e0fd9;
    box-shadow: 0 0 0 3px rgba(78, 15, 217, 0.1);
}

.table-container {
    overflow-x: auto;
}

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

.data-table thead th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #5a6c7d;
    padding: 16px 24px;
    border-bottom: 1px solid #e1e8ed;
    background: #f8fafc;
}

.data-table tbody td {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* Action Buttons */
.actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a6c7d;
    transition: all 0.2s;
    text-decoration: none;
}

.action-btn:hover {
    background: #f8f5ff;
    border-color: #4e0fd9;
    color: #4e0fd9;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e1e8ed;
}

.stat-card h3 {
    font-size: 13px;
    font-weight: 500;
    color: #5a6c7d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.stat-card .change {
    font-size: 13px;
    color: #10b981;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-product {
    background: #dbeafe;
    color: #1e40af;
}

.badge-service {
    background: #d1fae5;
    color: #065f46;
}

.badge-draft {
    background: #fef3c7;
    color: #92400e;
}

.badge-sent {
    background: #dbeafe;
    color: #1e40af;
}

.badge-paid {
    background: #d1fae5;
    color: #065f46;
}

.badge-overdue {
    background: #fee2e2;
    color: #991b1b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 32px;
    color: #5a6c7d;
}

.empty-state i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-container {
        margin-left: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Brand Unique Styles - Premium Design */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e1e8ed;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4e0fd9 0%, #fe9805 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(78, 15, 217, 0.15);
}

.stat-card:nth-child(odd)::before {
    background: linear-gradient(90deg, #4e0fd9 0%, #6b2ee3 100%);
}

.stat-card:nth-child(even)::before {
    background: linear-gradient(90deg, #fe9805 0%, #ffb547 100%);
}

/* Premium Header Gradient */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f5ff 100%);
    padding: 16px 32px;
    border-bottom: 2px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Accent Colors for Badges */
.badge-paid {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-sent {
    background: linear-gradient(135deg, #4e0fd9 0%, #6b2ee3 100%);
    color: white;
}

.badge-overdue {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.badge-draft {
    background: linear-gradient(135deg, #fe9805 0%, #ffb547 100%);
    color: white;
}

/* Enhanced Sidebar with Brand Accent */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #fefefe 100%);
    border-right: 1px solid #e1e8ed;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
}

/* Premium Tables */
.data-table thead th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #5a6c7d;
    padding: 16px 24px;
    border-bottom: 2px solid #4e0fd9;
    background: linear-gradient(135deg, #f8f5ff 0%, #fff8f0 100%);
}

/* Animated Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Accent Button with Orange */
.btn-accent {
    background: linear-gradient(135deg, #fe9805 0%, #ffb547 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(254, 152, 5, 0.25);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #e58804 0%, #ff9f1a 100%);
    box-shadow: 0 6px 16px rgba(254, 152, 5, 0.35);
    transform: translateY(-1px);
}

/* Content Cards with Premium Design */
.content-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #e1e8ed;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e1e8ed;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Premium Alert Styles */
.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

