:root {
  --primary-color: #ff9100;
  --secondary-color: #94a3b8;
  --bg-color: #202020; /* Tam istenen renk */
  --sidebar-bg: #1a1a1a;
  --text-color: #f8fafc;
  --accent-color: #e68200;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --card-bg-start: #262626;
  --card-bg-end: #1e1e1e;
  --glow-shadow: 0 0 15px rgba(255, 145, 0, 0.3);
}

/* Brand Color Overrides */
.text-primary { color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.link-primary { color: var(--primary-color) !important; }

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

body {
  font-family: 'Verdana', sans-serif;
  background-color: var(--bg-color) !important;
  background-image: radial-gradient(circle at 10% 20%, rgba(255, 145, 0, 0.02) 0%, transparent 50%);
  color: var(--text-color);
  overflow-x: hidden;
  animation: fadeIn 0.8s ease-out;
  min-height: 100vh;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    box-shadow: var(--glow-shadow);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(255, 145, 0, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(255, 145, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 145, 0, 0); }
}

/* Glassmorphism Cards */
.glass-card {
  background: linear-gradient(145deg, var(--card-bg-start), var(--card-bg-end));
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05); /* Çok ince hoş sınır */
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  border-radius: 1rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 145, 0, 0.1);
  border-color: rgba(255, 145, 0, 0.2);
}

.card-title {
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 1.1rem;
}

/* Sidebar Styles */
#wrapper {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#sidebar-wrapper {
  height: 100vh;
  margin-left: -15rem;
  transition: margin 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background-color: var(--sidebar-bg);
  width: 15rem;
  min-width: 15rem;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#sidebar-wrapper .sidebar-heading {
  padding: 1.5rem 1.25rem;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.1);
}

#sidebar-wrapper .list-group {
  width: 15rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-logout {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 2rem;
}

.list-group-item {
  border: none;
  padding: 1rem 1.5rem;
  color: var(--secondary-color);
  transition: all 0.3s ease;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: rgba(255, 145, 0, 0.1);
    transition: width 0.3s ease;
    z-index: 0;
}

.list-group-item:hover::before, .list-group-item.active::before {
    width: 100%;
}

.list-group-item > * {
    position: relative;
    z-index: 1;
}

.list-group-item:hover, .list-group-item.active {
  color: var(--primary-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 1.7rem; /* Hoverda hafif sağa kayma efekti */
}

#page-content-wrapper {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: all 0.3s ease-out;
}

#wrapper.toggled #sidebar-wrapper {
  margin-left: 0;
}

/* Navbar */
.navbar {
  background-color: var(--sidebar-bg) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  border-radius: 0 0 1.5rem 1.5rem;
  backdrop-filter: blur(15px);
  border: none !important;
  position: sticky;
  top: 0;
  z-index: 1020;
}

/* Sticky Action Area */
.sticky-action-area {
    position: sticky;
    top: 86px; /* Navbar height approximate */
    z-index: 1010;
    margin-bottom: 1.5rem;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-color);
    transition: color 0.3s;
}
.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(255, 145, 0, 0.4);
}

/* Buttons */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    background: rgba(255, 255, 255, 0.2);
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    opacity: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s;
}

.btn:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
    transition: 0s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border: none;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(255, 145, 0, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 145, 0, 0.4);
  animation: pulseGlow 1.5s infinite;
}

.btn-success {
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
  border: none;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
  border: none;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}


/* Tables */
.table-custom {
  background-color: var(--sidebar-bg) !important;
  color: var(--text-color) !important;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05) !important;
}

.table-custom td, .table-custom th {
    background-color: transparent !important;
    border-color: rgba(255,255,255,0.05) !important;
    vertical-align: middle !important;
}

.table-custom thead {
  background-color: #2c2c2c !important;
  border-bottom: 2px solid rgba(255, 145, 0, 0.2) !important;
}

.table-custom th {
  font-weight: 600;
  color: var(--secondary-color);
  border-bottom: none;
  padding: 1.2rem 1rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.table-custom td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #e2e8f0;
  transition: all 0.3s;
}

.table-custom tbody tr {
    transition: all 0.3s ease;
}

.table-custom tbody tr:hover {
    background-color: rgba(255, 145, 0, 0.05);
    transform: scale(1.005);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.table-custom tbody tr:hover td {
    color: #fff;
}

/* Form Controls */
.form-control, .form-select {
  border-radius: 0.5rem;
  background-color: #2c2c2c;
  color: #fff;
  border: 1px solid #444;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.form-control:focus, .form-select:focus {
  background-color: #333;
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(255, 145, 0, 0.2), inset 0 1px 2px rgba(0,0,0,0.1);
  outline: none;
}

.form-control::placeholder {
    color: #888;
}

.form-label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

/* Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), #fcd34d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.icon-box {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.glass-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}

.bg-primary-soft { 
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.15), rgba(255, 145, 0, 0.05)); 
    color: var(--primary-color); 
    border: 1px solid rgba(255, 145, 0, 0.2);
}
.bg-success-soft { 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05)); 
    color: var(--success-color); 
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.bg-danger-soft { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05)); 
    color: var(--danger-color); 
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge {
    padding: 0.5em 0.75em;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 0.4rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Dashboard Card Enhancements (Image Match) */
.card-income { border: 2px solid #10b981 !important; box-shadow: 0 0 15px rgba(16, 185, 129, 0.1) !important; border-radius: 1.25rem !important; }
.card-expense { border: 2px solid #ef4444 !important; box-shadow: 0 0 15px rgba(239, 68, 68, 0.1) !important; border-radius: 1.25rem !important; }
.card-profit { border: 2px solid #2563eb !important; box-shadow: 0 0 15px rgba(37, 99, 235, 0.1) !important; border-radius: 1.25rem !important; }

.dashboard-card-title {
    color: #64748b;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.dashboard-card-value {
    font-size: 1.8rem;
    font-weight: 800;
}

/* Mobile Navigation & Optimization */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 767.98px) {
    #sidebar-wrapper {
        display: none !important;
    }
    
    #wrapper.toggled #sidebar-wrapper {
        display: none !important;
    }

    #menu-toggle {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 145, 0, 0.2);
        z-index: 2000;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    }

    .mobile-bottom-nav a {
        color: var(--secondary-color);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.7rem;
        font-weight: 500;
        gap: 4px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 25%;
    }

    .mobile-bottom-nav a i {
        font-size: 1.3rem;
        transition: transform 0.3s;
    }

    .mobile-bottom-nav a.active {
        color: var(--primary-color);
    }

    .mobile-bottom-nav a.active i {
        transform: translateY(-3px);
        text-shadow: 0 0 10px rgba(255, 145, 0, 0.5);
    }

    #page-content-wrapper {
        padding-bottom: 80px !important;
        width: 100% !important;
    }

    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .navbar {
        padding: 0.75rem 1rem !important;
        border-radius: 0 !important;
    }

    .navbar h2 {
        font-size: 1.1rem !important;
        display: block !important;
    }

    .sticky-action-area {
        top: 65px; /* Mobile navbar height adjustments */
        margin-bottom: 1rem;
    }

    /* Mobile Table Optimizations */
    .table-custom {
        font-size: 0.85rem;
    }
    
    .table-custom th, .table-custom td {
        padding: 0.75rem 0.5rem;
    }

    .glass-card {
        padding: 1rem !important;
    }

    .dashboard-card-value {
        font-size: 1.5rem;
    }
}

/* Desktop Sidebar Toggle */
@media (min-width: 768px) {
  #sidebar-wrapper {
    margin-left: 0;
  }
  #page-content-wrapper {
    width: 100%;
  }
  #wrapper.toggled #sidebar-wrapper {
    margin-left: -15rem;
  }
}
