/* Embed code styling */
.embed-code-container {
    margin-bottom: 30px;
}

.embed-code {
    position: relative;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.embed-code pre {
    margin: 0;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #333;
}

.btn-copy-code {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-copy-code:hover {
    background: var(--color-secondary);
}

.embed-preview {
    margin-top: 30px;
}

.iframe-preview {
    border: 2px solid #eee;
    border-radius: 6px;
    padding: 20px;
    background: #f9f9f9;
    min-height: 300px;
}

/* Total statistics section */
.branch-stats-summary {
    margin-top: 30px;
}

/* Map placeholder */
.map-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.map-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

.map-placeholder p {
    font-size: 14px;
}


/*<!-- =========================  ENHANCED DESIGN OVERRIDES ========================= -->*/

:root {
    /* Theme-aware color variables */
    --color-primary: #3598dc;
    --color-secondary: #2979ff;
    --color-success: #26a69a;
    --color-info: #32c5d2;
    --color-warning: #f29a12;
    --color-danger: #e7505a;
    --color-dark: #2f353b;
    --color-light: #f3f6f9;
    --color-border: #ebedf3;
    --color-text: #333333;
    --color-text-light: #777777;
}

/* Branch portlet styling */
.branch-portlet {
    margin-bottom: 30px;
    transition: all .25s ease-in-out;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.branch-portlet:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Portlet title styling */
.branch-portlet .portlet-title {
    padding: 20px;
    border-bottom: 2px solid var(--color-primary);
    background: linear-gradient(135deg, #f8f9fa 0%, #f3f6f9 100%);
}

.branch-portlet .caption {
    display: flex;
    align-items: center;
}

.branch-portlet .caption i {
    font-size: 24px;
    margin-right: 12px;
    color: var(--color-primary);
}

.branch-portlet .caption-subject {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

.branch-portlet .caption-helper {
    color: var(--color-text-light);
    margin-left: 10px;
    font-size: 13px;
}

/* Status badge */
.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.status-badge.active {
    background-color: var(--color-success);
    color: white;
}

.status-badge.inactive {
    background-color: var(--color-danger);
    color: white;
}

/* Branch ID */
.branch-id {
    font-size: 12px;
    color: var(--color-text-light);
    margin-left: 10px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 15px;
}

/* Portlet body content */
.branch-portlet .portlet-body {
    padding: 0;
    background: #fff;
}

/* Tabs styling */
.branch-portlet .tabbable-custom {
    margin-bottom: 0;
}

.branch-portlet .tabbable-custom > .nav-tabs {
    border: none;
    background: #f9f9f9;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.branch-portlet .tabbable-custom > .nav-tabs::-webkit-scrollbar {
    display: none;
}

.branch-portlet .tabbable-custom > .nav-tabs > li {
    margin-right: 0;
    flex: 0 0 auto;
}

.branch-portlet .tabbable-custom > .nav-tabs > li > a {
    border: none;
    margin-right: 0;
    padding: 15px 20px;
    font-weight: 600;
    color: var(--color-text-light);
    border-radius: 0;
    position: relative;
    transition: all 0.3s;
}

.branch-portlet .tabbable-custom > .nav-tabs > li > a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.branch-portlet .tabbable-custom > .nav-tabs > li.active > a,
.branch-portlet .tabbable-custom > .nav-tabs > li > a:hover {
    background: transparent;
    color: var(--color-primary);
}

.branch-portlet .tabbable-custom > .nav-tabs > li.active > a:after,
.branch-portlet .tabbable-custom > .nav-tabs > li > a:hover:after {
    transform: scaleX(1);
}

.branch-portlet .tabbable-custom > .nav-tabs > li > a > i {
    margin-right: 5px;
}

.branch-portlet .tabbable-custom > .tab-content {
    padding: 25px;
    border: none;
}

/* Stats section */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.stat-card.primary::before {
    background: var(--color-primary);
}

.stat-card.success::before {
    background: var(--color-success);
}

.stat-card.info::before {
    background: var(--color-info);
}

.stat-card.warning::before {
    background: var(--color-warning);
}

.stat-card.danger::before {
    background: var(--color-danger);
}

.stat-card .stat-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 48px;
    opacity: 0.1;
    color: var(--color-text);
}

.stat-card .stat-title {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 5px;
}

.stat-card .stat-change {
    font-size: 13px;
    display: flex;
    align-items: center;
}

.stat-card .stat-change i {
    margin-right: 5px;
}

.stat-card .stat-change.positive {
    color: var(--color-success);
}

.stat-card .stat-change.negative {
    color: var(--color-danger);
}

/* Capacity meter */
.capacity-meter {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.capacity-meter .meter-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.capacity-meter .meter-subtitle {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.capacity-meter .meter-gauge {
    height: 15px;
    background: #eee;
    border-radius: 7.5px;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
}

.capacity-meter .meter-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 7.5px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transition: width 1s ease-in-out;
}

.capacity-meter .meter-labels {
    display: flex;
    justify-content: space-between;
}

.capacity-meter .meter-label {
    display: flex;
    align-items: center;
}

.capacity-meter .meter-label .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.capacity-meter .meter-label .dot.current {
    background: var(--color-primary);
}

.capacity-meter .meter-label .dot.capacity {
    background: #ccc;
}

/* Form sections */
.form-section {
    margin-bottom: 30px;
}

.form-section .section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.form-section .section-title i {
    margin-right: 10px;
    color: var(--color-primary);
}

/* Form fields */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-group {
    padding: 0 10px;
    margin-bottom: 20px;
    flex: 0 0 100%;
}

.form-group.col-2 {
    flex: 0 0 50%;
}

.form-group.col-3 {
    flex: 0 0 33.333%;
}

.form-group.col-4 {
    flex: 0 0 25%;
}

.form-control-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.form-control-container {
    position: relative;
}

.form-control-editable {
    width: 100%;
    padding: 10px 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    min-height: 42px;
    transition: all 0.2s;
}

.form-control-editable:hover {
    background: #f3f3f3;
    border-color: #ccc;
}

.form-control-edit-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    transition: all 0.2s;
}

.form-control-container:hover .form-control-edit-icon {
    color: var(--color-primary);
}

/* Signature upload */
.signature-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.signature-preview {
    width: 200px;
    height: 120px;
    border: 2px dashed #e5e5e5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: #f9f9f9;
    overflow: hidden;
}

.signature-preview img {
    max-width: 100%;
    max-height: 100%;
}

.signature-actions {
    display: flex;
    gap: 10px;
}

.btn-upload {
    padding: 6px 12px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-upload:hover {
    background: var(--color-secondary);
}

/* Map preview */
.map-preview {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

/* Two-tone Social Media Icons - Exact Match */
.social-media-section {
    margin-top: 20px;
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #4a4a4a;
}

.section-title i {
    margin-right: 8px;
    color: #3598dc;
}

.social-media-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    position: relative;
}

/* Base social icon style - exact match to the design */
.social-icon {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    position: relative;
    background: #f3f3f3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* The colored bottom part */
.social-icon:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    z-index: 1;
}

/* Icon positioning */
.social-icon i {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #9a9a9a;
    font-size: 20px;
    z-index: 2;
}

/* Social-specific colors for bottom portion */
.social-icon.facebook:after {
    background-color: #3b5998;
}

.social-icon.instagram:after {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

.social-icon.twitter:after {
    background-color: #1da1f2;
}

.social-icon.linkedin:after {
    background-color: #0077b5;
}

.social-icon.youtube:after {
    background-color: #ff0000;
}

/* Active state maintains the same appearance but with slightly stronger shadow */
.social-icon.active {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

/* Hover effect - subtle lift */
.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

/* Edit button */
.social-edit {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #3598dc;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s;
}

.social-link:hover .social-edit {
    opacity: 1;
}

/* Textarea styling */
textarea.form-control-editable {
    min-height: 100px;
    resize: vertical;
}

/* Action buttons */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

.btn-primary:hover {
    background: var(--color-secondary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

/* Original table hidden */
.original-table {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .stats-dashboard {
        grid-template-columns: 1fr;
    }

    .form-group.col-2,
    .form-group.col-3,
    .form-group.col-4 {
        flex: 0 0 100%;
    }

    .branch-portlet .tabbable-custom > .nav-tabs > li > a {
        padding: 12px 15px;
        font-size: 13px;
    }

    .branch-portlet .tabbable-custom > .tab-content {
        padding: 15px;
    }

    .capacity-meter {
        padding: 15px;
    }
}

/* Inactive Şube - Belirgin Kırmızı Header Tasarımı */
.cb-branch-portlet-inactive {
    /*border: 2px solid #e74c3c;*/
    /*background-color: #fff;*/
    position: relative;
}

/* Kırmızı header background - ana fark bu olacak */
.cb-branch-portlet-inactive .portlet-title {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-bottom: none;
    color: white;
    position: relative;
}

/* Başlık alanındaki tüm yazılar beyaz olacak */
.cb-branch-portlet-inactive .portlet-title * {
    color: white !important;
}

.cb-branch-portlet-inactive .caption i {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cb-branch-portlet-inactive .caption-subject {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.cb-branch-portlet-inactive .caption-helper {
    color: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Status badge beyaz üzerine kırmızı */
.cb-branch-portlet-inactive .status-badge.inactive {
    background-color: white;
    color: #e74c3c !important;
    border: 2px solid white;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cb-branch-portlet-inactive .branch-id {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* Dropdown menü (tools) - beyaz yapacağız */
.cb-branch-portlet-inactive .portlet-title .tools .dropdown-toggle {
    color: white !important;
}

.cb-branch-portlet-inactive .portlet-title .tools .dropdown-toggle:after {
    border-top-color: white;
}

/* Header'da warning icon ekleyelim */
.cb-branch-portlet-inactive .portlet-title::before {
    content: "\f071"; /* FontAwesome warning icon */
    font-family: FontAwesome;
    position: absolute;
    top: 50%;
    right: 60px;
    transform: translateY(-50%);
    color: white;
    font-size: 18px;
    opacity: 0.8;
    animation: cb-warning-pulse 2s ease-in-out infinite;
}

@keyframes cb-warning-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Body alanını biraz soluklaştıralım */
.cb-branch-portlet-inactive .portlet-body {
    background-color: #fafafa;
    opacity: 0.95;
}

/* İstatistik kartları - hafif kırmızı vurgu */
.cb-branch-portlet-inactive .stat-card {
    background-color: #fff;
    border: 1px solid #f8d7da;
    border-left: 4px solid #e74c3c;
}

.cb-branch-portlet-inactive .stat-card::before {
    background-color: #e74c3c;
}

.cb-branch-portlet-inactive .stat-value {
    color: #721c24;
}

.cb-branch-portlet-inactive .stat-icon {
    color: #e74c3c;
    opacity: 0.1;
}

/* Kapasite ölçer */
.cb-branch-portlet-inactive .capacity-meter {
    background-color: #fff;
    border: 1px solid #f8d7da;
}

.cb-branch-portlet-inactive .capacity-meter .meter-bar {
    background-color: #dc3545;
}

.cb-branch-portlet-inactive .capacity-meter .meter-label .dot.current {
    background-color: #dc3545;
}

/* Sekmeler - kırmızı vurgu */
.cb-branch-portlet-inactive .tabbable-custom > .nav-tabs {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e74c3c;
}

.cb-branch-portlet-inactive .tabbable-custom > .nav-tabs > li.active > a,
.cb-branch-portlet-inactive .tabbable-custom > .nav-tabs > li > a:hover {
    color: #721c24;
    font-weight: 600;
}

.cb-branch-portlet-inactive .tabbable-custom > .nav-tabs > li.active > a:after,
.cb-branch-portlet-inactive .tabbable-custom > .nav-tabs > li > a:hover:after {
    background-color: #e74c3c;
}

/* Form elemanları */
.cb-branch-portlet-inactive .form-control-editable {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
}

.cb-branch-portlet-inactive .form-control-editable:hover {
    border-color: #e74c3c;
    background-color: #fff;
}

.cb-branch-portlet-inactive .form-control-edit-icon {
    color: #adb5bd;
}

.cb-branch-portlet-inactive .form-control-container:hover .form-control-edit-icon {
    color: #e74c3c;
}

/* Section başlıkları */
.cb-branch-portlet-inactive .section-title {
    color: #721c24;
    border-bottom-color: #f8d7da;
}

.cb-branch-portlet-inactive .section-title i {
    color: #e74c3c;
}

.cb-branch-portlet-inactive .portlet-title {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* Sosyal medya ikonları soluk */
.cb-branch-portlet-inactive .social-icon {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    opacity: 0.7;
}

.cb-branch-portlet-inactive .social-icon i {
    color: #adb5bd;
}

.cb-branch-portlet-inactive .social-icon:after {
    background-color: #dc3545 !important;
    opacity: 0.5;
}

/* Inactive overlay - artık gereksiz çünkü header zaten kırmızı */
.cb-inactive-overlay {
    display: none;
}

/*!* Subtle hover effect *!*/
/*.cb-branch-portlet-inactive:hover {*/
/*    transform: translateY(-2px);*/
/*    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);*/
/*    transition: all 0.3s ease;*/
/*}*/

/* Hafif gölge efekti */
/*.cb-branch-portlet-inactive {*/
/*    box-shadow: 0 2px 15px rgba(231, 76, 60, 0.1);*/
/*}*/