:root 
{
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f72585;
    --light: #f8f9fa;
    --dark: #6c757d;
    --gray: #adb5bd;
}
.compose-container {
            display: grid;
            grid-template-rows: auto 1fr auto;
            width:100%;
            margin: 20px auto;
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            overflow: hidden;
            /* unblock if you want to make scrollbar
            height: calc(100vh - 40px);
            */
            height:auto;
        }
        
        /* Header Styles */
        .compose-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            background: #4b5158;
            color: white;
        }
        
        .header-title {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .header-title i {
            width: 20px;
            height: 20px;
            stroke-width: 2;
        }
        
        .header-actions {
            display: flex;
            gap: 15px;
        }
        
        .header-btn {
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 14px;
            opacity: 0.8;
            transition: opacity 0.2s;
        }
        
        .header-btn:hover {
            opacity: 1;
        }
        
        .header-btn svg {
            width: 15px;
            height: 15px;
            stroke-width: 2;
        }
        
        /* Form Styles */
        .compose-form {
            display: flex;
            flex-direction: column;
            padding: 20px;
            /* create scrollbar if needed overflow-y:auto; */
            overflow:none;
        }
        
        .form-group {
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        
        .form-group label {
            width: 80px;
            font-size: 14px;
            color: var(--gray);
        }
        
        .form-control {
            flex: 1;
            border: 1px solid #e9ecef;
            border-radius: 6px;
            padding: 10px 15px;
            font-size: 14px;
            transition: border 0.2s;
        }
        
        .form-control:focus {
            outline: none;
            border-color: var(--primary);
        }
        
        .recipient-container {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 5px;
            min-height: 40px;
            border: 1px solid #e9ecef;
            border-radius: 6px;
            padding: 5px 10px;
        }
        
        .recipient-tag {
            display: inline-flex;
            align-items: center;
            background: var(--light);
            border-radius: 16px;
            padding: 4px 10px;
            font-size: 13px;
            animation: fadeIn 0.3s;
        }
        
        .recipient-tag.invalid {
            background: rgba(247, 37, 133, 0.1);
            border: 1px dashed var(--danger);
        }
        
        .recipient-tag i {
            width: 14px;
            height: 14px;
            stroke-width: 2;
            margin-left: 5px;
            cursor: pointer;
            color: var(--gray);
        }
        
        .recipient-tag i:hover {
            color: var(--danger);
        }
        
        .recipient-input {
            flex: 1;
            min-width: 100px;
            border: none;
            outline: none;
            padding: 5px;
        }
        
        .cc-bcc-toggle {
            display: flex;
            gap: 10px;
            margin-right: 10px;
        }
        
        .toggle-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 13px;
            padding: 2px 5px;
            border-radius: 3px;
        }
        
        .toggle-btn.active {
            background: var(--primary);
            color: white;
        }
        
        /* Editor Styles */
        #editor {
            min-height: 300px;
            border: 1px solid #e9ecef;
            border-radius: 6px;
            margin-bottom: 15px;
        }
        
        .ql-toolbar {
            border-radius: 6px 6px 0 0;
            border: 1px solid #e9ecef !important;
        }
        
        .ql-container {
            border-radius: 0 0 6px 6px;
            border: 1px solid #e9ecef !important;
            font-family: inherit;
        }
        
        /* Attachment Styles */
        .attachment-area {
            margin-top: 15px;
            border: 1px dashed #e9ecef;
            border-radius: 6px;
            padding: 15px;
            text-align: center;
            transition: all 0.3s;
        }
        
        .attachment-area.drag-over {
            background: rgba(67, 97, 238, 0.05);
            border-color: var(--primary);
        }
        
        .attachment-preview {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 10px;
        }
        
        .attachment-item {
            display: flex;
            align-items: center;
            background: var(--light);
            border-radius: 6px;
            padding: 8px 12px;
            font-size: 13px;
            animation: fadeIn 0.3s;
        }
        
        .attachment-item i {
            width: 14px;
            height: 14px;
            stroke-width: 2;
            margin-right: 8px;
        }
        
        .attachment-remove {
            margin-left: 8px;
            cursor: pointer;
            color: var(--gray);
        }
        
        .attachment-remove:hover {
            color: var(--danger);
        }
        
        .attachment-progress {
            width: 100%;
            height: 3px;
            background: #e9ecef;
            margin-top: 5px;
            border-radius: 3px;
            overflow: hidden;
        }
        
        .attachment-progress-bar {
            height: 100%;
            background: var(--primary);
            width: 0%;
            transition: width 0.3s;
        }
        
        /* Footer Styles */
        .compose-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            border-top: 1px solid #e9ecef;
            background: white;
        }
        
        .footer-actions {
            display: flex;
            gap: 10px;
        }
        
        .footer-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 8px 15px;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid transparent;
        }
        
        .footer-btn.primary {
            background: var(--primary);
            color: white;
        }
        
        .footer-btn.primary:hover {
            background: var(--secondary);
        }
        
        .footer-btn.secondary {
            background: var(--light);
            border-color: #e9ecef;
        }
        
        .footer-btn.secondary:hover {
            background: #e9ecef;
        }
        
        .footer-btn i {
            width: 16px;
            height: 16px;
            stroke-width: 2;
        }
        
        .footer-options {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .option-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--gray);
            display: flex;
            align-items: center;
            position: relative;
        }
        
        .option-btn:hover {
            color: var(--primary);
        }
        
        .option-btn i {
            width: 18px;
            height: 18px;
            stroke-width: 2;
        }
        
        .option-menu {
            position: absolute;
            bottom: 100%;
            right: 0;
            background: white;
            border-radius: 6px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            padding: 10px 0;
            min-width: 200px;
            z-index: 10;
            display: none;
        }
        
        .option-menu.active {
            display: block;
        }
        
        .menu-item {
            padding: 8px 15px;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }
        
        .menu-item:hover {
            background: var(--light);
        }
        
        .menu-item i {
            width: 16px;
            height: 16px;
            stroke-width: 2;
        }
        
        /* Animations */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(5px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .compose-container {
                margin: 0;
                height: 100vh;
                border-radius: 0;
            }
            
            .form-group {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .form-group label {
                width: auto;
                margin-bottom: 5px;
            }
            
            .recipient-container {
                width: 100%;
            }
        }