/* ==================== ISTPOWERTECH - UPS GARANTİ TAKİP SİSTEMİ ==================== */
/* Profesyonel, Sade ve Şık Tasarım - Kırmızı, Beyaz, Gri Tonları */

/* ==================== RENK PALETİ ==================== */
:root {
    --primary-red: #DC2626;
    --dark-red: #991B1B;
    --light-red: #FEE2E2;
    --white: #FFFFFF;
    --light-gray: #F3F4F6;
    --medium-gray: #6B7280;
    --dark-gray: #1F2937;
    --border-gray: #E5E7EB;
    --success: #059669;
    --warning: #D97706;
    --danger: #DC2626;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ==================== GENEL STILLER ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
    min-height: 100vh;
}

/* ==================== NAVIGATION BAR ==================== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-red);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.navbar-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.navbar-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-gray);
    letter-spacing: -0.5px;
}

.navbar-title span {
    color: var(--primary-red);
}

.navbar-subtitle {
    font-size: 0.75rem;
    color: var(--medium-gray);
    font-weight: 400;
    margin-top: -5px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-user {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.navbar-user strong {
    color: var(--dark-gray);
}

/* Role Badges */
.role-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 5px;
}

.role-super_admin {
    background: var(--primary-red);
    color: var(--white);
}

.role-admin {
    background: #3B82F6;
    color: var(--white);
}

/* ==================== ADMIN NAVIGATION ==================== */
.admin-nav {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-red);
}

.admin-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-nav .nav-brand img {
    height: 45px;
    width: auto;
}

.admin-nav .nav-brand h2 {
    font-size: 1.3rem;
    color: var(--dark-gray);
    font-weight: 700;
}

.admin-nav {
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user span {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.nav-user strong {
    color: var(--dark-gray);
}

/* ==================== CONTAINERS ==================== */
.public-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.admin-container {
    min-height: 100vh;
    background: var(--light-gray);
}

.admin-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ==================== HEADER ==================== */
.public-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-red);
}

.public-header h1 {
    font-size: 2rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
    font-weight: 700;
}

.public-header p {
    color: var(--medium-gray);
    font-size: 1rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-gray);
}

.content-header h1 {
    font-size: 1.8rem;
    color: var(--dark-gray);
    font-weight: 700;
}

.content-header div {
    display: flex;
    gap: 10px;
}

/* ==================== CARDS ==================== */
.search-card,
.result-card,
.form-container,
.info-card,
.history-container {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.search-card {
    border-left: 4px solid var(--primary-red);
}

.result-card {
    border-left: 4px solid var(--success);
}

.form-container h3,
.info-card h3,
.history-container h3 {
    color: var(--dark-gray);
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--dark-red);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--medium-gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--dark-gray);
}

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

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

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

.btn-warning:hover {
    background: #B45309;
}

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

.btn-danger:hover {
    background: var(--dark-red);
}

.btn-info {
    background: #3B82F6;
    color: var(--white);
}

.btn-info:hover {
    background: #2563EB;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

/* ==================== FORMS ==================== */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 16px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--dark-gray);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px var(--light-red);
}

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

.required {
    color: var(--primary-red);
    font-weight: bold;
}

.form-divider {
    border: none;
    border-top: 2px solid var(--light-gray);
    margin: 10px 0;
}

.form-actions {
    gap: 15px;
    margin-top: 10px;
}

/* ==================== MODERN SEARCH FORM ==================== */
.modern-search-form {
    width: 100%;
}

.search-wrapper {
    display: flex;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--primary-red);
}

.modern-search-input {
    flex: 1;
    padding: 24px 28px;
    font-size: 1.15rem;
    border: none;
    outline: none;
    background: var(--white);
    color: var(--dark-gray);
    font-weight: 500;
}

.modern-search-input::placeholder {
    color: var(--medium-gray);
    font-weight: 400;
}

.modern-search-button {
    padding: 24px 40px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.modern-search-button:hover {
    background: var(--dark-red);
    transform: scale(1.02);
}

.search-icon {
    font-size: 1.4rem;
}

.search-text {
    letter-spacing: 1px;
}

/* Old search form styles - keeping for compatibility */
.public-search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-block {
    width: 100%;
    padding: 20px 32px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-block:hover {
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .search-wrapper {
        flex-direction: column;
    }

    .modern-search-button {
        justify-content: center;
        padding: 20px;
    }
}

/* ==================== ADMIN SEARCH BOX ==================== */
.search-box {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--dark-gray);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px var(--light-red);
}

.search-input::placeholder {
    color: var(--medium-gray);
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-color: var(--success);
}

.alert-error {
    background: var(--light-red);
    color: #7F1D1D;
    border-color: var(--danger);
}

.alert-warning {
    background: #FEF3C7;
    color: #78350F;
    border-color: var(--warning);
}

/* ==================== TABLES ==================== */
.table-container {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.data-table thead {
    background: var(--primary-red);
    color: var(--white);
}

.data-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-gray);
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background: var(--light-gray);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* ==================== DETAIL VIEW ==================== */
.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    color: var(--dark-gray);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.detail-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--medium-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.05rem;
    color: var(--dark-gray);
    font-weight: 500;
}

/* ==================== STATUS BADGES ==================== */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #D1FAE5;
    color: #065F46;
}

.status-expired {
    background: var(--light-red);
    color: #7F1D1D;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

/* ==================== WARRANTY MESSAGES ==================== */
.warranty-message {
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    border-left: 4px solid;
}

.success-message {
    background: #D1FAE5;
    color: #065F46;
    border-color: var(--success);
}

.warning-message {
    background: #FEF3C7;
    color: #78350F;
    border-color: var(--warning);
}

/* ==================== HISTORY TIMELINE ==================== */
.history-timeline {
    position: relative;
    padding-left: 30px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-red);
}

.history-item {
    position: relative;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-red);
    transition: all 0.2s ease;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.history-item::before {
    content: '📌';
    position: absolute;
    left: -42px;
    top: 20px;
    width: 24px;
    height: 24px;
    background: var(--white);
    border: 3px solid var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.history-date {
    font-size: 0.9rem;
    color: var(--medium-gray);
    font-weight: 500;
}

.history-admin {
    font-size: 0.9rem;
    color: var(--primary-red);
    font-weight: 600;
}

.history-content {
    color: var(--dark-gray);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.history-edit-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--border-gray);
}

/* ==================== INFO GRID ==================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-size: 0.85rem;
    color: var(--medium-gray);
    font-weight: 600;
    text-transform: uppercase;
}

.info-value {
    font-size: 1rem;
    color: var(--dark-gray);
    font-weight: 500;
}

/* ==================== FOOTER ==================== */
.public-footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px 20px;
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.public-footer a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
}

.public-footer a:hover {
    text-decoration: underline;
}

.copyright {
    margin-top: 10px;
    font-size: 0.85rem;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--medium-gray);
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.help-text {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* ==================== LOGIN PAGE ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-gray) 0%, #E5E7EB 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 50px 40px;
    width: 100%;
    max-width: 450px;
    border-top: 5px solid var(--primary-red);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header img {
    height: 60px;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 1.8rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--medium-gray);
    font-size: 0.95rem;
}

/* ==================== INFO BOX ==================== */
.info-box {
    background: var(--light-gray);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-red);
    margin: 20px 0;
}

.info-box p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.info-box strong {
    color: var(--primary-red);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .navbar-container {
        height: auto;
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .navbar-brand {
        flex-direction: column;
        text-align: center;
    }

    .navbar-logo {
        height: 40px;
    }

    .navbar-title {
        font-size: 1.2rem;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .content-header div {
        width: 100%;
        flex-direction: column;
    }

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

    .detail-row-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .history-timeline {
        padding-left: 20px;
    }

    .history-item::before {
        left: -32px;
    }

    .login-card {
        padding: 40px 30px;
    }

    .btn {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }
}