/**
 * AGNES Admin Panel - Modern Professional Stylesheet
 * Dosya: assets/css/style.css
 * Versiyon: 2.0
 */

/* ============= RESET & VARIABLES ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1f2937;
    --light: #f9fafb;
    --border: #e5e7eb;
    --text: #374151;
    --text-light: #6b7280;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --shadow: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--light);
    line-height: 1.6;
}

/* ============= LOGIN PAGE ============= */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo h1 {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 8px;
}

.logo p {
    color: var(--text-light);
    font-size: 15px;
    font-weight: 500;
}

.demo-info {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    font-size: 13px;
}

/* ============= FORMS ============= */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* ============= BUTTONS ============= */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ============= ALERTS ============= */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* ============= LAYOUT ============= */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.sidebar-header {
    padding: 30px 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
}

.sidebar-header h2 {
    background: linear-gradient(135deg, #667eea, #9b8aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 800;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 4px 12px;
    border-radius: 10px;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    color: white;
    transform: translateX(5px);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sidebar-nav a span {
    margin-right: 12px;
    font-size: 20px;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    background: var(--light);
}

.top-header {
    background: white;
    padding: 20px 35px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.content {
    padding: 35px;
}

/* ============= TOOLBAR ============= */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.search-box {
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>') no-repeat 15px center;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* ============= STATS ============= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============= TABLE ============= */
.table-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 16px 20px;
    text-align: left;
}

table th {
    background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    font-size: 12px;
    border-bottom: 2px solid var(--border);
}

table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

table tbody tr:hover {
    background: #f9fafb;
}

/* ============= ACTION BUTTONS ============= */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--light);
    transform: scale(1.15);
}

/* ============= STATUS BADGES ============= */
.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.on_leave,
.status-badge.on_hold {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.terminated {
    background: #fee2e2;
    color: #991b1b;
}

/* ============= PAGINATION ============= */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding: 20px 25px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.pagination-buttons {
    display: flex;
    gap: 6px;
}

.pagination-buttons .btn {
    min-width: 40px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

.pagination-buttons .btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
}

/* ============= MODAL ============= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    padding: 35px;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ============= CARDS ============= */
.card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.card h2 {
    margin-bottom: 22px;
    color: var(--dark);
    font-size: 20px;
    font-weight: 700;
    border-bottom: 2px solid var(--light);
    padding-bottom: 12px;
}

/* ============= FORM LAYOUT ============= */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid var(--light);
}

/* ============= DASHBOARD SPECIFIC ============= */
.financial-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.activity-list {
    max-height: 450px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid var(--light);
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: var(--light);
}

.activity-icon {
    font-size: 24px;
    margin-right: 15px;
}

.activity-content {
    flex: 1;
}

.deadlines-list {
    max-height: 450px;
    overflow-y: auto;
}

.deadline-item {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    background: var(--light);
}

.deadline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.task-title {
    font-weight: 600;
}

.priority-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.priority-badge.urgent {
    background: #fee2e2;
    color: #991b1b;
}

.progress-bar {
    width: 120px;
    height: 8px;
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
    display: inline-block;
    margin-right: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

/* ============= UTILITIES ============= */
.loading {
    color: var(--text-light);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .toolbar {
        flex-direction: column;
    }
    
    .search-box {
        max-width: 100%;
    }
}

/* ============= SCROLLBAR ============= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}