/* 
 * Main CSS File - Updated with DM Sans font and Role-based Colors
 * Temel stiller ve component'ler
 */

/* Import Google Font - DM Sans */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/* Import Component Styles */
@import url('./components/alerts.css');
@import url('./components/header.css');
@import url('./components/cta-buttons.css');

/* Reset ve Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #202124;
    line-height: 1.6;
    min-height: 100vh;
    font-size: 14px;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Role-based Color Variables */
:root {
    /* Default colors */
    --primary-bg: #e5e5e5;
    --primary-text: #000;
    --primary-active-bg: #d5d5d5;
    --primary-active-text: #000;
    --primary-hover-bg: rgba(0,0,0,0.04);
    --primary-cta-bg: #000;
    --primary-cta-hover: #333;
}

/* Freelancer Theme */
body[data-role="freelancer"] {
    --primary-bg: #C8BDF4;
    --primary-text: #000;
    --primary-active-bg: #B8A9F0;
    --primary-active-text: #000;
    --primary-hover-bg: #D2C9F6;
    --primary-cta-bg: #8B73E8;
    --primary-cta-hover: #7A61E5;
}

/* Sole Trader Theme */
body[data-role="sole_trader"] {
    --primary-bg: #E8D4B0;  /* Warm beige/gold tone */
    --primary-text: #2C2416;
    --primary-active-bg: #DCC299;
    --primary-active-text: #2C2416;
    --primary-hover-bg: #F0E0C4;
    --primary-cta-bg: #B8860B;  /* Goldenrod */
    --primary-cta-hover: #9A7209;
}

/* Business Theme */
body[data-role="business"] {
    --primary-bg: #DAE8EB;
    --primary-text: #fff;
    --primary-active-bg: #C1D7DB;
    --primary-active-text: #fff;
    --primary-hover-bg: #D1DEE1;
    --primary-cta-bg: #4A9BA8;
    --primary-cta-hover: #3A8895;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.5em;
    line-height: 1.2;
    font-family: 'DM Sans', sans-serif;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1em;
}

/* =================================================================
   SIDEBAR LAYOUT COMPONENTS - Detailed Inter font implementation
   ================================================================= */

/* Sidebar Styles */
.sidebar {
    background-color: #f8f9fa;
    height: 100vh;
    border-right: 1px solid #e0e0e0;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: none;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sidebar-logo {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    margin-left: 12px;
}

.sidebar-brand h3 {
    font-weight: 600;
    font-size: 18px;
    color: #000;
    margin: 0;
    font-family: 'DM Sans', sans-serif;
}

.sidebar-brand i {
    font-size: 16px;
    color: #666;
}

.sidebar-nav {
    padding: 8px 16px 0 16px;
    list-style: none;
    margin: 0;
    background-color: #f8f9fa;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.sidebar-nav > li {
    margin-bottom: 3px;
}

/* Main navigation links - darker and bigger */
.sidebar-nav > li > a {
    display: flex;
    align-items: center;
    padding: 12px 12px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 400;
    font-size: 15px;
    transition: all 0.15s ease;
    border-radius: 6px;
    width: calc(100% - 0px);
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

.sidebar-nav > li > a:hover {
    background-color: rgba(20, 18, 65, 0.08);
    color: #141241;
}

.sidebar-nav > li > a.active {
    background-color: #141241;
    color: white;
    font-weight: 500;
}

.sidebar-nav > li > a i {
    margin-right: 12px;
    width: 16px;
    font-size: 16px;
    color: #555;
}

.sidebar-nav > li > a:hover i {
    color: #141241;
}

.sidebar-nav > li > a.active i {
    color: white;
}

.sidebar-nav .chevron {
    margin-left: auto;
    font-size: 12px;
    color: #aaa;
    transition: transform 0.15s ease;
}

.sidebar-nav .chevron.open {
    transform: rotate(180deg);
}

.sidebar-nav .submenu {
    background-color: transparent;
    padding: 0;
    margin: 0 0 8px 0;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.sidebar-nav .submenu.open {
    max-height: 500px;
    padding-bottom: 4px;
}

.sidebar-nav .submenu li {
    margin-bottom: 2px;
}

/* Submenu links with bullet points */
.sidebar-nav .submenu > li > a {
    display: flex;
    align-items: center;
    padding: 8px 12px 8px 40px;
    font-size: 14px;
    color: #666;
    font-weight: 400;
    margin: 0;
    width: 100%;
    text-decoration: none;
    transition: all 0.15s ease;
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
    position: relative;
}

/* Bullet points for submenu items */
.sidebar-nav .submenu > li > a::before {
    content: '•';
    position: absolute;
    left: 24px;
    color: #bbb;
    font-size: 12px;
    font-weight: 300;
    line-height: 1;
}

.sidebar-nav .submenu > li > a:hover {
    background-color: rgba(20, 18, 65, 0.08);
    color: #141241;
}

.sidebar-nav .submenu > li > a:hover::before {
    color: #141241;
}

.sidebar-nav .submenu > li > a.active {
    background-color: #141241;
    color: white;
    font-weight: 500;
}

.sidebar-nav .submenu > li > a.active::before {
    color: white;
}

/* Third level submenu */
.sidebar-nav .submenu .submenu {
    padding: 0;
    margin: 0;
}

.sidebar-nav .submenu .submenu > li > a {
    padding: 6px 8px 6px 56px;
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

.sidebar-nav .submenu .submenu > li > a::before {
    left: 40px;
    font-size: 10px;
    font-weight: 300;
    color: #ccc;
}

.sidebar-nav .submenu .submenu > li > a:hover {
    background-color: rgba(20, 18, 65, 0.08);
    color: #141241;
}

.sidebar-nav .submenu .submenu > li > a:hover::before {
    color: #141241;
}

.sidebar-nav .submenu .submenu > li > a.active {
    background-color: #141241;
    color: white;
    font-weight: 500;
}

.sidebar-nav .submenu .submenu > li > a.active::before {
    color: white;
}

.bottom-nav {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f8f9fa;
    padding: 16px 16px;
    margin-top: auto;
    border-top: 1px solid #e9ecef;
}

.bottom-nav a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #666;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: all 0.15s ease;
    width: calc(100% - 0px);
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

.bottom-nav a:last-child {
    margin-bottom: 0;
}

.bottom-nav a:hover {
    background-color: rgba(230, 34, 90, 0.08);
    color: #E6225A;
}

.bottom-nav a i {
    margin-right: 12px;
    width: 16px;
    font-size: 14px;
    color: #666;
}

.bottom-nav a:hover i {
    color: #E6225A;
}

/* Logout button specific styling */
.bottom-nav a.logout-btn {
    color: #dc3545;
    border: 1px solid transparent;
    margin-top: 8px;
    transition: all 0.15s ease;
}

.bottom-nav a.logout-btn:hover {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.bottom-nav a.logout-btn i {
    color: #dc3545;
}

.bottom-nav a.logout-btn:hover i {
    color: white;
}

/* =================================================================
   MAIN CONTENT LAYOUT COMPONENTS
   ================================================================= */

/* Main Content Layout */
.main-content {
    margin-left: 280px;
    padding: 0 50px 80px 50px;
    background-color: #fff;
    min-height: 100vh;
    overflow-y: auto;
}

/* Header styles moved to components/header.css */

.footer-pagination {
    background-color: #fff;
    border-top: 1px solid #e9ecef;
    padding: 16px 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -50px;
}

/* Content Header with Tabs */
.content-header {
    padding: 24px 82px 0;
    background-color: #fff;
    position: relative;
    margin: 0 -50px;
}

.tabs {
    margin-bottom: 0;
    position: relative;
}

.tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -82px;
    right: -82px;
    height: 1px;
    background-color: #e9ecef;
    z-index: 1;
}

.tab-link {
    display: inline-block;
    padding: 12px 0;
    margin-right: 32px;
    color: #5f6368;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
}

.tab-link.active {
    color: #495057;
    border-bottom-color: #495057;
}

/* Cards and Content Sections */
.content-section {
    padding: 24px 82px;
    background-color: #fff;
    margin: 0 -50px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #202124;
    margin: 0;
}

.section-subtitle {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
    font-weight: 400;
}

.btn-primary-action {
    background: var(--primary-cta-bg);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary-action:hover {
    background: var(--primary-cta-hover);
    color: white;
    text-decoration: none;
}

/* Card Grid Layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    margin: 0;
}

.card-subtitle {
    font-size: 12px;
    color: #5f6368;
    margin: 8px 0 24px 0;
    line-height: 1.4;
}

.card-value {
    font-size: 24px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 20px;
}

/* =================================================================
   SHARED COMPONENTS (Tables, Pagination, etc.)
   ================================================================= */

/* Table Styles */
.data-table {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 25px;
}

.table {
    margin: 0;
    font-size: 14px;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
}

.table thead th {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 16px;
    font-weight: 500;
    color: #5f6368;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 16px;
    border-top: 1px solid #e9ecef;
    vertical-align: middle;
    background-color: #fff;
}

.table tbody tr {
    background-color: #fff;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:hover td {
    background-color: #f8f9fa;
}

.table-icon {
    margin-right: 8px;
    color: #888;
    font-size: 12px;
    width: 12px;
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 82px;
    margin: 0 -50px;
    background-color: #fff;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 400;
}

.pagination-btn:hover {
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.pagination-btn:disabled {
    background-color: #f8f9fa;
    color: #ccc;
    cursor: not-allowed;
    border-color: #f0f0f0;
}

.pagination-number {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 400;
}

.pagination-number.active {
    background: #333;
    border-color: #333;
    color: #fff;
}

.pagination-number:hover {
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.pagination-number.active:hover {
    background: #333;
    color: #fff;
}

.pagination-dots {
    color: #999;
    font-size: 12px;
    padding: 6px 4px;
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 12px;
    font-weight: 400;
}

.pagination-select {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 4px 20px 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23999" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 6px;
    min-width: 40px;
}

/* Status badges and indicators */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #e8f5e8;
    color: #137333;
}

.status-badge.warning {
    background-color: #fef7e0;
    color: #f9ab00;
}

.status-badge.error {
    background-color: #fce8e6;
    color: #d93025;
}

.status-badge.info {
    background-color: #e8f0fe;
    color: #1a73e8;
}

/* =================================================================
   ONBOARDING LAYOUT COMPONENTS (Existing)
   ================================================================= */

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

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    background-color: #fff;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.form-control.error {
    border-color: #d93025;
}

.form-control.valid {
    border-color: #137333;
}

.form-control::placeholder {
    color: #999;
}

.form-text {
    font-size: 13px;
    color: #5f6368;
    margin-top: 8px;
}

.form-error {
    font-size: 13px;
    color: #d93025;
    margin-top: 8px;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
}

.btn-primary {
    background: var(--primary-cta-bg);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-cta-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:disabled,
.btn-primary.loading {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f8f9fa;
    color: #202124;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

.btn-text {
    background: transparent;
    color: #1a73e8;
    padding: 8px 16px;
}

.btn-text:hover {
    background: #f8f9ff;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

/* Responsive Design */
@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Tablet and mobile sidebar */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        box-shadow: none;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    }
    
    /* Dashboard responsive */
    .main-content {
        margin-left: 0;
        padding: 0 16px 40px 16px;
    }
    
    .top-header, .content-section, .card-grid {
        padding-left: 32px;
        padding-right: 32px;
        margin-left: -16px;
        margin-right: -16px;
    }
    
    .content-header {
        padding-left: 32px;
        padding-right: 32px;
        margin-left: -16px;
        margin-right: -16px;
    }
    
    .tabs::after {
        left: -32px;
        right: -32px;
    }
    
    .pagination-container {
        padding-left: 32px;
        padding-right: 32px;
        margin-left: -16px;
        margin-right: -16px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .user-section {
        display: none;
    }
}

@media (max-width: 576px) {
    /* Mobile-specific sidebar adjustments */
    .sidebar {
        width: 280px;
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
    }
    
    /* Ensure main content takes full width */
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
    }
}