/* 全局设置 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f8f9fa;
    padding-top: 60px;
    padding-bottom: 60px;
    color: #333;
}

/* 统一卡片风格 */
/* 按钮通用设置 - 增加 Flexbox 对齐 */
.btn-custom-base {
    display: inline-flex; /* 关键：启用 Flexbox */
    align-items: center;  /* 关键：垂直居中 */
    justify-content: center;
    padding: 12px 25px;   /* 统一内边距 */
    font-size: 1.05rem;   /* 统一字号 */
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* 按钮 - 主色调 (实心绿) */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2E7D32;
    border: 1px solid #2E7D32; /* 统一边框宽度 */
    color: white;
    padding: 12px 25px;
    font-size: 1.05rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: #1B5E20;
    border-color: #1B5E20;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

/* 按钮 - 轮廓绿 (空心) */
.btn-outline-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2E7D32;
    border: 2px solid #2E7D32; /* 2px 边框 */
    background-color: transparent;
    padding: 11px 25px; /* 减去1px以补偿边框差异，或统一用 12px */
    font-size: 1.05rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background-color: #2E7D32;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

/* [新增] 按钮 - 轮廓红 (空心 - 用于退出) */
.btn-outline-danger-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d32f2f;      /* Material Design Red */
    border: 2px solid #d32f2f;
    background-color: transparent;
    padding: 11px 25px;  /* 保持与绿色按钮一致 */
    font-size: 1.05rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-danger-custom:hover {
    background-color: #d32f2f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

/* 头部风格 A: 纯色背景 (用于注册、修改密码、首页) */
.card-header {
    background-color: #2E7D32; /* 梧桐绿 */
    color: white;
    padding: 30px 20px;
    border-bottom: none;
    text-align: center;
}

.card-header h2, .card-header h4 {
    font-weight: 600;
    margin-bottom: 8px;
}

.card-header small, .card-header p {
    opacity: 0.9;
    font-size: 0.95rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

/* 头部风格 B: 渐变背景 (用于个人中心) */
.header-bg {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

/* 按钮 - 主色调 (实心) */
.btn-primary-custom {
    background-color: #2E7D32;
    border-color: #2E7D32;
    color: white;
    padding: 12px 25px;
    font-size: 1.05rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: #1B5E20;
    border-color: #1B5E20;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

/* 按钮 - 轮廓 (空心) */
.btn-outline-custom {
    color: #2E7D32;
    border: 2px solid #2E7D32;
    background-color: transparent;
    padding: 12px 25px;
    font-size: 1.05rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background-color: #2E7D32;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

/* 表单控件 */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-control {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #2E7D32;
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.25);
}

.input-group-text {
    background-color: #f1f3f5;
    border-color: #ced4da;
}

/* 辅助类 */
.text-srils {
    color: #2E7D32 !important;
}

.section-title {
    border-left: 4px solid #2E7D32;
    padding-left: 12px;
    margin-bottom: 20px;
    color: #2E7D32;
    font-weight: 700;
    font-size: 1.1rem;
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

/* 个人中心特定样式 */
.info-item {
    border-bottom: 1px solid #eee;
    padding: 16px 0;
}
.info-item:last-child {
    border-bottom: none;
}
.info-label {
    color: #6c757d;
    font-weight: 500;
}
.info-value {
    font-weight: 600;
    color: #212529;
}

/* Custom background color for Srils primary theme */
.bg-srils-primary {
    background-color: #2E7D32 !important;
}

/* Modern Card Hover Effect */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

/* Custom switch color for form-check-input */
.form-check-input:checked {
    background-color: #2E7D32; /* Srils Green */
    border-color: #2E7D32; /* Srils Green */
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.25); /* Focus glow to match green theme */
}

/* --- Hero Section Background Image --- */
.hero-section {
    position: relative;
    /* Solid Green Gradient Background (Base) */
    background: linear-gradient(to right, #2E7D32, #1B5E20);
    color: white;
    padding: 140px 0 200px;
    clip-path: polygon(0 0, 100% 0, 100% 55%, 0 100%);
    z-index: 0; /* Establish stacking context */
}

/* The Transparent Image Overlay */
.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
        /* The Image */
        background: url('../img/srils_background_image.png') center/contain repeat;
        /* Gradient Opacity via CSS Mask */
        mask-image: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0.1));
        /* Optional: Blend mode for better integration */
        mix-blend-mode: overlay;
        z-index: -1; /* Place behind text but above the green background */}

/* Ensure text content is above */
.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Auth Card for Index.html */
.auth-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Feature Icon Box for Index.html */
.feature-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-color: rgba(46, 125, 50, 0.1);
    color: #2E7D32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

/* Service Card */
.service-card {
    position: relative; /* Essential for stretched-link */
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    height: 100%; /* Unified height */
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Sidebar Card (for Profile/Menu) */
.sidebar-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    background: white;
    overflow: hidden;
}

/* Section Label */
.section-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6c757d;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: block;
}

/* List Group Items (Custom Style) */
.list-group-item {
    border: none;
    border-bottom: 1px solid #f1f3f5;
    padding: 1rem 1.25rem;
}
.list-group-item:last-child {
    border-bottom: none;
}

/* Unified Navbar Style (Green Glassmorphism) */
.navbar-srils {
    background-color: rgba(46, 125, 50, 0.95) !important; /* Srils Primary Green */
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-srils .navbar-brand,
.navbar-srils .nav-link,
.navbar-srils .btn-outline-light {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.navbar-srils .nav-link:hover {
    color: rgba(255,255,255,0.9) !important;
    transform: translateY(-1px);
}

.navbar-srils .navbar-toggler {
    border-color: rgba(255,255,255,0.5);
}

.navbar-srils .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
